diff --git a/core/lib/class.plx.utils.php b/core/lib/class.plx.utils.php index aac85c580..8a288d1ac 100644 --- a/core/lib/class.plx.utils.php +++ b/core/lib/class.plx.utils.php @@ -1062,5 +1062,23 @@ public static function debug($obj) { echo $obj; echo ""; } + + /** + * Envoie un message vers la console javascript pour aider au déboggage. + * @author J.P. Pourrez alias bazooka07 + * @version 2017-06-09 + * */ + public static function debugJS($obj, $msg='') { + + if(!empty($msg)) $msg .= ' = '; + $msg .= (is_array($obj)) ? print_r($obj, true) : ((is_string($obj)) ? "\"$obj\"" : $obj); + echo <<< EOT + + +EOT; + } + } ?>