mirror of
https://github.com/filp/whoops.git
synced 2026-08-31 20:48:18 +00:00
Dump the frame arguments below the source code
This commit is contained in:
@@ -136,15 +136,6 @@ header {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.frame-arg {
|
||||
margin-left: 20px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.frame-arg-separated .sf-dump::after {
|
||||
content: ',';
|
||||
}
|
||||
|
||||
.frame-index {
|
||||
font-size: 11px;
|
||||
color: #a29d9d;
|
||||
@@ -322,7 +313,7 @@ pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag */
|
||||
pre .atn, code .atn { color: #ef7c61; font-weight: normal;} /* html/xml attribute name */
|
||||
pre .atv, code .atv { color: #bcd42a; } /* html/xml attribute value */
|
||||
pre .dec, code .dec { color: #606; } /* decimal */
|
||||
pre.prettyprint, code.prettyprint {
|
||||
pre.prettyprint, code.prettyprint, .frame-args.prettyprint, .frame-args.prettyprint samp {
|
||||
font-family: "Inconsolata", "Fira Mono", "Source Code Pro", Monaco, Consolas, "Lucida Console", monospace;
|
||||
background: #333;
|
||||
color: #e9e4e5;
|
||||
|
||||
@@ -47,6 +47,16 @@
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $frameArgs = $tpl->dumpArgs($frame); ?>
|
||||
<?php if ($frameArgs): ?>
|
||||
<div class="frame-file">
|
||||
Arguments
|
||||
</div>
|
||||
<div class="code-block frame-args prettyprint">
|
||||
<?php echo $frameArgs; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php
|
||||
// Append comments for this frame
|
||||
$comments = $frame->getComments();
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<span class="frame-index"><?php echo (count($frames) - $i - 1) ?></span>
|
||||
<span class="frame-class"><?php echo $tpl->escape($frame->getClass() ?: '') ?></span>
|
||||
<span class="frame-function"><?php echo $tpl->escape($frame->getFunction() ?: '') ?></span>
|
||||
<?php echo $tpl->dumpArgs($frame); ?>
|
||||
</div>
|
||||
|
||||
<span class="frame-file">
|
||||
|
||||
@@ -141,15 +141,11 @@ class TemplateHelper
|
||||
$numFrames = count($frame->getArgs());
|
||||
|
||||
if ($numFrames > 0) {
|
||||
$html .= '(';
|
||||
$html = '<ol class="linenums">';
|
||||
foreach($frame->getArgs() as $j => $frameArg) {
|
||||
$class = 'frame-arg';
|
||||
if ($j != $numFrames - 1 ) {
|
||||
$class .= ' frame-arg-separated';
|
||||
}
|
||||
$html .= '<span class="'. $class .'">'. $this->dump($frameArg) .'</span>';
|
||||
$html .= '<li>'. $this->dump($frameArg) .'</li>';
|
||||
}
|
||||
$html .= ')';
|
||||
$html .= '</ol>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
||||
Reference in New Issue
Block a user