Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define('DEBUG', true);
- debug({ print_r($arr); });
- on_debug_die("application exit");
- define('DEBUG', "DEBUG"); //Comment this line when you are done debugging
- function debug_out($input) {
- if (defined("DEBUG")) {
- print_r($input);
- die;
- }
- }
- $log->debug($arr);
- function on_debug_die($msg) {
- if (defined('DEBUG')) die($msg);
- }
- on_debug_die(print_r($arr,1));
- function debug() {
- if (!DEBUG) {
- return;
- }
- $args = get_func_args();
- // var_dump, log to file, whatever
- }
- function debug($val) {
- if (defined('DEBUG') && DEBUG) {
- echo '<pre>', var_dump($val), '</pre>';
- die();
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement