Bug 148513 - Web Inspector: console.trace() should include passed argument values
Summary: Web Inspector: console.trace() should include passed argument values
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-26 22:45 PDT by Nikita Vasilyev
Modified: 2016-12-13 15:34 PST (History)
4 users (show)

See Also:


Attachments
patch (5.00 KB, patch)
2015-11-04 14:13 PST, João Oliveira
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2015-08-26 22:45:48 PDT
See: http://nv.github.io/captureCalls.js/


Expected:

console.trace()
  ► lookupKey(key="Tab", map=Object, handle=function) – codemirror.js
  ...

Same, but expanded:

console.trace()
  ▼ lookupKey(key="Tab", map=Object, handle=function) – codemirror.js
   · "Tab"
   · ► {Up: function, Down: function, Right: function, Esc: function, Enter: function, …}
   · function (b) { return doHandleBinding(cm, b); }


Actual:

console.trace()
  lookupKey – codemirror.js
  ...


Notes:

Currently, we use WebInspector.StackTraceView to display console.trace, and caught and uncaught errors. An example of an caught error:

    try {
      i.dont.exist++;
    } catch (e) {
      console.log(e);
    }

For this case, we can't display passed arguments values because "e" doesn't have them.

I think, we should be able to get passed arguments values for uncaught errors, e.g:

    i.dont.exist++;

and console.trace().
Comment 1 Radar WebKit Bug Importer 2015-08-26 22:46:05 PDT
<rdar://problem/22451487>
Comment 2 Timothy Hatcher 2015-08-27 13:50:22 PDT
<rdar://problem/8082776>
Comment 3 Joseph Pecoraro 2015-09-25 15:43:13 PDT
Clearing assignee, no action in 30 days. I think and open source contributor is interested in this.
Comment 4 Nikita Vasilyev 2015-09-26 00:45:38 PDT
Good to hear. I can provide guidance since I implemented the last version of the stack trace view.
Comment 5 Nikita Vasilyev 2015-11-02 11:19:11 PST
Any ideas where/how can we get argument values? WebInspector.ConsoleMessage doesn't have this data.
Comment 6 João Oliveira 2015-11-04 14:13:21 PST
Created attachment 264812 [details]
patch