Bug 164848
| Summary: | Web Inspector: console messages should include async stack trace if available | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Matt Baker <mattbaker> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | hi, inspector-bugzilla-changes, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | 163230 | ||
| Bug Blocks: | |||
Matt Baker
Summary:
Console messages should include async stack trace if available. When console.trace, console.error, etc, are called from an asynchronous callback the call stack shown the console should include async frames in addition to the standard call frames.
Note:
Inspector::Protocol::Console::ConsoleMessage already has a stackTrace property, which is currently an array of Console::CallFrame. This can be replaced with Console::StackTrace, and a simple check added to LogManager in the frontend:
messageWasAdded(target, source, level, text, type, url, line, column, repeatCount, parameters, stackTrace, requestId)
{
// Called from WebInspector.ConsoleObserver.
stackTrace = stackTrace.callFrames ? stackTrace : WebInspector.StackTrace.fromPayload(target, {callFrames: stackTrace});
...
}
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Matt Baker
or rather:
let stackTracePayload = stackTrace.callFrames ? stackTrace : {callFrames: stackTrace};
WebInspector.StackTrace.fromPayload(target, stackTracePayload);
Radar WebKit Bug Importer
<rdar://problem/29301189>
Devin Rousso
The frontend part sounds "easy", but how about the backend part? I think this would be SUPER awesome 😁, especially for protocol tracing.