Open Bug 1021925 Opened 10 years ago Updated 2 years ago

Make frames in stack traces expandable to display the frame with a few lines surrounding it

Categories

(DevTools :: Console, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: fitzgen, Unassigned)

References

Details

(Whiteboard: [polish-backlog])

Whenever we put a stack trace in the console's output, we should make each frame expandable so that you can see the line from that stack frame plus some context around it. In crappy ascii art, here is a mock up: Error: this is an error > foo@bar.js:12:34 > baz@qux.js:22:12 And then if you clicked on the first stack frame, it would get expanded to something like this: Error: this is an error V foo@bar.js:12:34 9| var count = 0; 10| for (var i = 0; i < arr.length; i++) { 11| if (errorCondition) { **12| throw new Error("Error: this is an error"); 13| } 14| count += getCount(arr[i]); 15| } > baz@qux.js:22:12 And if you clicked on the second stack frame: Error: this is an error V foo@bar.js:12:34 9| var count = 0; 10| for (var i = 0; i < arr.length; i++) { 11| if (errorCondition) { **12| throw new Error("Error: this is an error"); 13| } 14| count += getCount(arr[i]); 15| } V baz@qux.js:22:12 19| // This is the foo bar baz... 20| function baz(x, y, z) { 21| if (needToCallFoo()) { **22| foo(x, y, z); 23| } 24| return true; 25| } The "**" is just to show that the actual line from the stack frame would be highlighted.
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
See Also: → 1141222, 639800, 814497
Depending on bug 1137384 so that sources and their contents are easily retrievable from actors other than the ThreadActor.
Depends on: 1137384
Whiteboard: [polish-backlog]
See Also: → 1046256
See Also: → 481008
Product: Firefox → DevTools
Type: defect → enhancement
Summary: Make frames in stack traces expandable → Make frames in stack traces expandable to display the frame with a few lines surrounding it
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.