If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Make frames in stack traces expandable

NEW
Unassigned

Status

()

Firefox
Developer Tools: Console
P3
normal
3 years ago
2 years ago

People

(Reporter: fitzgen, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

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.

Updated

3 years ago
Blocks: 778766
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
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: → bug 1046256
See Also: → bug 481008
You need to log in before you can comment on or make changes to this bug.