Debugger jumps to 1st line on "step in" if the first token in function is "function"

RESOLVED INVALID

Status

RESOLVED INVALID
2 years ago
6 months ago

People

(Reporter: arni2033, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
>>>
STR_1:
1. Open attached "testcase 1"
2. Open debugger, prettify script containing word "click"
3. Set breaking on "click" event, click on the page
4. Keep clicking "Step in" button until line "console.log(123);" is executed

AR:
 When debugger steps into a function, then, if the first token in that function is "function",
 debugger jumps to line 1. That line becomes highlighted with green; caret is displayed in that line

ER:
 When debugger steps into a function, some sensible line inside that function should be selected.
 In other words, debugger should select lines in the very same sequence as in STR_2 (see below).


STR_2:
1. Open attached "testcase 1"
2. Set breaking on "wheel" event, hover mouse over the page, rotate mouse wheel down once
3. Keep clicking "Step in" button until line "console.log(123);" is executed

AR:  Everything's OK
(Reporter)

Updated

2 years ago
No longer blocks: 1277113
(Reporter)

Updated

2 years ago
Component: Untriaged → Developer Tools: Canvas Debugger
(Reporter)

Updated

2 years ago
Component: Developer Tools: Canvas Debugger → Developer Tools: Debugger
Comment hidden (spam)
Thanks Arni, I investigated the bug and found if I clean up the HTML/JS then the stepping behavior is fine. My guess is that this is a result of how the script was setup.

https://gist.github.com/jasonLaster/d67b90d169d21896d8e69f104afdf19a
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID

Updated

6 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.