Closed Bug 1327713 Opened 7 years ago Closed 7 years ago

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

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: arni2033, Unassigned)

Details

Attachments

(1 file)

>>>
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
No longer blocks: 1277113
Component: Untriaged → Developer Tools: Canvas Debugger
Component: Developer Tools: Canvas Debugger → Developer Tools: Debugger
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
Closed: 7 years ago
Resolution: --- → INVALID
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: