Returns debug report
762287
public function getReport()
    {
        $report = array();

        $report['restDebug'] = $this->debug->generateOutput();

        $reportEZDebug = $this->eZDebug->printReportInternal( false );
        $report['eZDebug'] = explode( "\n", $reportEZDebug );


        return $report;
    }
88135
public function get_debug_string() {
		return 'status: '.$this->statuscode.' body:'.htmlentities($this->body).' errors: '.print_r($this->errors, true);
	}
608623
private static function debugEnd()
    {
        // SWATDB_DEBUG is legacy, use SwatDB::setDebug() instead
        if (defined('SWATDB_DEBUG') || self::$debug) {
            self::$debug_wrapper_depth--;

            if (self::$debug_wrapper_depth === 0) {
                $count = 0;
                $depth = 0;

                foreach (self::$debug_info as $info) {
                    if ($info['depth'] < $depth) {
                        echo str_repeat(
                            '</blockquote>',
                            $depth - $info['depth']
                        );
                    } elseif ($info['depth'] > $depth) {
                        echo '<blockquote class="swat-db-debug">';
                    } elseif ($info['depth'] === 0) {
                        echo '<hr />';
                    }

                    echo "\n" . $info['message'] . "\n";

                    $locale = SwatI18NLocale::get();
                    printf(
                        "<p>Query #%s</p>\n",
                        $locale->formatNumber($info['count'])
                    );

                    if (count(self::$debug_info) > $count + 1) {
                        $time = self::$debug_info[$count + 1]['time'];
                    } else {
                        $time = microtime(true) * 1000;
                    }

                    $ms = $time - $info['time'];

                    printf(
                        "<p><strong>%s ms</strong></p>\n",
                        $locale->formatNumber($ms, 3)
                    );

                    if ($info['depth'] === 0 && count(self::$debug_info) > 1) {
                        $ms =
                            microtime(true) * 1000 -
                            self::$debug_info[0]['time'];

                        echo '<p><strong>';

                        printf(
                            Swat::_(
                                'Total time: %s ms (includes ' .
                                    'queries within the wrapper)'
                            ),
                            $locale->formatNumber($ms, 3)
                        );

                        echo '</strong></p>';
                    }

                    $count++;
                    $depth = $info['depth'];
                }

                if ($depth > 0) {
                    echo str_repeat('</blockquote>', $depth);
                }

                // reset debug info for the next query
                self::$debug_info = array();
            }
        }
    }
1335947
def debug(func):
    """"""
    @wraps(func)
    def wrapper(*args, **kwargs):
        print("{} args: {} kwargs: {}".format(func.__name__, args, kwargs))
        return func(*args, **kwargs)

    return wrapper
703394
static function printReport( $newWindow = false, $as_html = true, $returnReport = false,
                           $allowedDebugLevels = false, $useAccumulators = true, $useTiming = true, $useIncludedFiles = false )
    {
        if ( !self::isDebugEnabled() )
            return null;

        $debug = self::instance();
        $report = $debug->printReportInternal( $as_html, $returnReport & $newWindow, $allowedDebugLevels, $useAccumulators, $useTiming, $useIncludedFiles );

        if ( $newWindow == true )
        {
            $debugFilePath = eZDir::path( array( eZSys::varDirectory(), 'cache', 'debug.html' ) );
            $debugFileURL = $debugFilePath;
            eZURI::transformURI( $debugFileURL, true );
            print( "
<script type='text/javascript'>
<!--

(function()
{
    var debugWindow;

    if  (navigator.appName == \"Microsoft Internet Explorer\")
    {
        //Microsoft Internet Explorer
        debugWindow = window.open( '$debugFileURL', 'ezdebug', 'width=500,height=550,status,scrollbars,resizable,screenX=0,screenY=20,left=20,top=40');
        debugWindow.document.close();
        debugWindow.location.reload();
    }
    else if (navigator.appName == \"Opera\")
    {
        //Opera
        debugWindow = window.open( '', 'ezdebug', 'width=500,height=550,status,scrollbars,resizable,screenX=0,screenY=20,left=20,top=40');
        debugWindow.location.href=\"$debugFileURL\";
        debugWindow.navigate(\"$debugFileURL\");
    }
    else
    {
        //Mozilla, Firefox, etc.
        debugWindow = window.open( '', 'ezdebug', 'width=500,height=550,status,scrollbars,resizable,screenX=0,screenY=20,left=20,top=40');
        debugWindow.document.location.href=\"$debugFileURL\";
    };
})();

// -->
</script>
" );
            $header = "<!DOCTYPE html><html><head><title>eZ debug</title></head><body>";
            $footer = "</body></html>";
            $fullPage = ezpEvent::getInstance()->filter( 'response/output', $header . $report . $footer );
            file_put_contents( $debugFilePath, $fullPage );
        }
        else
        {
            if ( $returnReport )
                return $report;
        }
        return null;
    }
429444
def debug(context):
    

    from pprint import pformat
    output = [pformat(val) for val in context]
    output.append('\n\n')
    output.append(pformat(sys.modules))
    return ''.join(output)
922736
def debug(msg):
    '''
    
    '''
    if DEBUG:
        sys.stderr.write("DEBUG: " + msg + "\n")
        sys.stderr.flush()
1107376
private function receive_debug_log() {
	// handle error report
	if (isset($_POST['description']) && isset($_POST['log'])) {
		$msg = $_POST['log'];
		mail($this->classparams['errormail'], $_POST['description'], $msg);
	} else {
		if (isset($_SERVER['SERVER_ADMIN']))
		mail($_SERVER['SERVER_ADMIN'], 'Empty jupload error log',
                    'An empty log has just been posted.');
		$this->logPHPDebug('receive_debug_log', 'Empty error log received');
	}
	exit;
}
560788
def writeWorkerDebug(debugStats, queueLength, path_suffix=""):
    """"""
    createDirectory(path_suffix)
    origin_prefix = "origin-" if scoop.IS_ORIGIN else ""
    statsFilename = os.path.join(
        getDebugDirectory(),
        path_suffix,
        "{1}worker-{0}-STATS".format(getDebugIdentifier(), origin_prefix)
    )
    lengthFilename = os.path.join(
        getDebugDirectory(),
        path_suffix,
        "{1}worker-{0}-QUEUE".format(getDebugIdentifier(), origin_prefix)
    )
    with open(statsFilename, 'wb') as f:
        pickle.dump(debugStats, f)
    with open(lengthFilename, 'wb') as f:
        pickle.dump(queueLength, f)
1224606
def simple_debug_shell(globals, locals):
    
    try:
        import readline
    except ImportError:
        pass  # ignore
    compile_string_fn = "<simple_debug_shell input>"
    while True:
        try:
            s = raw_input("> ")
        except (KeyboardInterrupt, EOFError):
            print("breaked debug shell: " + sys.exc_info()[0].__name__)
            break
        if s.strip() == "":
            continue
        try:
            c = compile(s, compile_string_fn, "single")
        except Exception as e:
            print("%s : %s in %r" % (e.__class__.__name__, str(e), s))
        else:
            set_linecache(compile_string_fn, s)
            # noinspection PyBroadException
            try:
                ret = eval(c, globals, locals)
            except (KeyboardInterrupt, SystemExit):
                print("debug shell exit: " + sys.exc_info()[0].__name__)
                break
            except Exception:
                print("Error executing %r" % s)
                better_exchook(*sys.exc_info(), autodebugshell=False)
            else:
                # noinspection PyBroadException
                try:
                    if ret is not None:
                        print(ret)
                except Exception:
                    print("Error printing return value of %r" % s)
                    better_exchook(*sys.exc_info(), autodebugshell=False)
359421
def display(level='DEBUG'):
    """"""
    logger = get_logger()
    sh = logging.StreamHandler()
    sh.setLevel(getattr(logging, level))
    sh.setFormatter(DEFAULT_LOG_FORMAT)
    logger.addHandler(sh)
897154
def bugreport(dest_file="default.log"):
    
    adb_full_cmd = [v.ADB_COMMAND_PREFIX, v.ADB_COMMAND_BUGREPORT]
    try:
        dest_file_handler = open(dest_file, "w")
    except IOError:
        print("IOError: Failed to create a log file")
    
    # We have to check if device is available or not before executing this command
    # as adb bugreport will wait-for-device infinitely and does not come out of 
    # loop
    # Execute only if device is available only
    if _isDeviceAvailable():
        result = _exec_command_to_file(adb_full_cmd, dest_file_handler)
        return (result, "Success: Bug report saved to: " + dest_file)
    else:
        return (0, "Device Not Found")
1298739
def debug(self, i: int=None) -> str:
        
        head = "[" + colors.yellow("debug") + "]"
        if i is not None:
            head = str(i) + " " + head
        return head
217016
public function getDebugMessage()
    {
        $message = '<font color="red">DEBUG START</font><br>';
        foreach ($this->debugMessage as $items) {
            if (is_array($items) || is_object($items)) {
                $message .= "<pre>";
                $message .= print_r($items, true) . '<br/>';
                $message .= "</pre>";
            } elseif (!is_array($items) && !is_object($items)) {
                if (strpos($items, 'form action=') !== false) {
                    $message .= highlight_string($items, true) . '<br/>';
                } else {
                    $message .= $items . '<br/>';
                }
            }
        }

        if ($this->commMethod == 'liveupdate') {
            $message .= "-----------------------------------------------------------------------------------<br>";
            $message .= 'HASH FIELDS ' . print_r($this->hashFields, true);

            $message .= "-----------------------------------------------------------------------------------<br>";
            $message .= 'HASH DATA ' . print_r($this->hashData, true);

            $message .= "-----------------------------------------------------------------------------------<br>";
            $message .= highlight_string(@$this->luForm, true) . '<br/>';

            $message .= "-----------------------------------------------------------------------------------<br>";
            $message .= 'HASH CHECK ' . "<a href='http://hash.online-convert.com/md5-generator'>ONLINE HASH CONVERTER</a><br>";
        }
        $message .= "-----------------------------------------------------------------------------------<br>";
        $message .= '<font color="red">DEBUG END</font><br>';
        iconv(mb_detect_encoding($message, mb_detect_order(), true), "UTF-8", $message);
        return $message;
    }
918313
def debug(value):
    
    print("%s %s: " % (type(value), value))
    print(dir(value))
    print('\n\n')
    return ''
620815
def getbug(self, objid,
               include_fields=None, exclude_fields=None, extra_fields=None):
        
        data = self._getbug(objid,
            include_fields=include_fields, exclude_fields=exclude_fields,
            extra_fields=extra_fields)
        return Bug(self, dict=data, autorefresh=self.bug_autorefresh)
912487
def debug(message)
      (m = filter(message, :debug)) && each {|l| l.debug(m)}
    end