mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-06-20 09:49:48 +02:00
Add stack trace to exceptions (#397)
This commit is contained in:
committed by
Barry vd. Heuvel
parent
b49e46a266
commit
3169ed558d
@ -108,6 +108,7 @@ class ExceptionsCollector extends DataCollector implements Renderable
|
||||
'code' => $e->getCode(),
|
||||
'file' => $filePath,
|
||||
'line' => $e->getLine(),
|
||||
'stack_trace' => $e->getTraceAsString(),
|
||||
'surrounding_lines' => $lines,
|
||||
'xdebug_link' => $this->getXdebugLink($filePath, $e->getLine())
|
||||
);
|
||||
|
@ -558,6 +558,13 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (e.stack_trace) {
|
||||
e.stack_trace.split("\n").forEach(function(trace) {
|
||||
var $traceLine = $('<div />');
|
||||
$('<span />').addClass(csscls('filename')).text(trace).appendTo($traceLine);
|
||||
$traceLine.appendTo(li);
|
||||
});
|
||||
}
|
||||
}});
|
||||
this.$list.$el.appendTo(this.$el);
|
||||
|
||||
|
Reference in New Issue
Block a user