Bug 80384
Summary: | Web Inspector: show corresponding call stack at function/timer creation | ||
---|---|---|---|
Product: | WebKit | Reporter: | Yehuda Katz <wycats> |
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | apavlov, bburg, bweinstein, fishd, graouts, joepeck, keishi, krinklemail, loislo, paulirish, pfeldman, pmuellr, rafaelw, rik, timothy, webkit-bug-importer, yurys |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Yehuda Katz
In browser code, it's common to create a function that will be invoked asynchronously later. Two common cases are the function passed to setTimeout and Ajax callbacks.
In these cases, it can often be convenient to be able to see the original stack trace from when the function was originally created, in addition to when it was invoked.
I would like to propose that it be possible to attach "the current call stack" to a function before it is invoked, and that when debugging code downstream from the function's invocation, that the original stack be available (probably with some kind of divider between the current stack and original stack).
I would ideally like to be able to jump back to the original stack and observe the state at that time (i.e. normal stack debugging), but if that was impossible or too difficult, just showing me the code context would be extremely helpful.
Straw man proposal:
fn = function() { debugger; }
fn.debugCurrentCallsite();
setTimeout(fn, 1000);
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Rafael Weinstein
Any feelings about this feature request?
Yehuda represents a large portion of developer mind share. We really want this kind of feedback. I think it'd go a long way, even just to entertain the idea and communicate something about likely implementation complexity and relative priority given other work, as a first step.
Rafael Weinstein
Any feelings about this feature request?
Yehuda represents a large portion of developer mind share. We really want this kind of feedback. I think it'd go a long way, even just to entertain the idea and communicate something about likely implementation complexity and relative priority given other work, as a first step.
Radar WebKit Bug Importer
<rdar://problem/15911060>
Timothy Hatcher
We do this in TOT and Safari 7 / 6.1.