Closed Bug 1551222 Opened 5 years ago Closed 5 years ago

thrown exceptions on console evaluation only have 1 `debugger eval code` frame

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

Steps to reproduce

  1. Open the webconsole
  2. Evaluate the following
function a() { b(); } 
function b() { c(); } 
function c() { bleah; }
a()
  1. Expand the error message

Expected results

I do see the multiple frames that led to the error.

Actual results

I only see the c frame (the last debugger eval code one in the stack)


Blocks: 1550360

We now have stacktrace for expressions evaluated in the console
that throws, and we are stripping any frames that are devtools
internals.
But the way we were doing this meant that we were only having
one debugger eval code frame, even if the expression in the console
had multiple frames.
Also, if an expression was throwing without having any debugger eval code frame (e.g. expression with SyntaxError), we were sending internal
frames.
This patch should fix those 2 cases and a linux 64 ccov intermittent
caused by a different line number for an internal frame in a fixture
packet.
Tests cases are added to the existing mochitest to ensure this
works as expected.

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/867447201d5d
Fix stacktrace for throwing console evaluated expressions. r=bhackett.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: