Bug 164848

Summary: Web Inspector: console messages should include async stack trace if available
Product: WebKit Reporter: Matt Baker <mattbaker>
Component: Web InspectorAssignee: 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
Reported 2016-11-16 17:49:35 PST
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
Matt Baker
Comment 1 2016-11-16 17:50:40 PST
or rather: let stackTracePayload = stackTrace.callFrames ? stackTrace : {callFrames: stackTrace}; WebInspector.StackTrace.fromPayload(target, stackTracePayload);
Radar WebKit Bug Importer
Comment 2 2016-11-16 17:54:31 PST
Devin Rousso
Comment 3 2019-02-14 14:52:13 PST
The frontend part sounds "easy", but how about the backend part? I think this would be SUPER awesome 😁, especially for protocol tracing.
Note You need to log in before you can comment on or make changes to this bug.