It is impossible to remove breakpoints on prettyfied sources
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(firefox89 fixed)
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: random_n0body, Assigned: wartmanm)
References
(Blocks 3 open bugs)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:85.0) Gecko/20100101 Firefox/85.0
Steps to reproduce:
THIS IS THE SET UP
- Go to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart
- Open devtools
- Select "inspector"
- select "pick an element from the page"
- select the "run" button
- click on "event" on the highlighted element in the dom
- click on "open in debugger" (aka jump to function definition) on the small tooltip window
- press the "pretty print sources" button
- set a breakpoint where it says
f()
(currently line 65) - click the "run" button
- watch the debugger pause
- continue the debugger
NOW FOR THE DIFFERENT WAYS TO TRIGGER THE BUG
Method 1:
- At the "breakpoints" list on the right side click "remove breakpoint" on the breakpoint
- close the tab
- reopen the tab (cmd + shift + t) or open a new tab at the same address
- press the "run" button on the page
Method 2 (leads to same results as method 1):
- On the left hand side of the line where the breakpoint is there is an arrow highlighting the breakpoint, rightclick the arrow and select "remove breakpoint"
- close the tab
- reopen the tab
- press the "run" button on the page
Method 3 (leads to the same result as method 1 and 2):
- On the left hand side rightclick on the breakpoint again
- Select "remove breakpoints on line"
- Close the tab
- Reopen the same address with debugger open
- press the "run" button on the page
Actual results:
The breakpoint is there again and will trigger / pause in the debugger.
Expected results:
The breakpoint should be GONE, REMOVED and NOT TRIGGER after I HAVE REMOVED IT THREE TIMES.
The only way to remove it is to right click the breakpoint list and select "delete all breakpoints". After that the breakpoint is gone. The three other delete buttons should also do this.
Reporter | ||
Comment 1•4 years ago
|
||
Possible duplicate of #1621819? Not sure if #1621819 isn't another issue though. And because nothing was done about it anyways I'm reporting it again, because this issue is frankly ridiculous.
Comment 2•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 3•4 years ago
|
||
Thanks for reporting! We can reproduce.
Updated•4 years ago
|
Looking in pending-breakpoints.js, there's special handling that always adds pretty-printed breakpoints to the minified version of the file. However, there's no such handling for removing breakpoints, so it tries to remove it from whichever version of the source is open, usually the pretty-printed one.
Making remove use the same logic as add seems to fix it. As as workaround, switching to the minified version of the file and then removing breakpoints also works to get rid of them.
Reporter | ||
Comment 6•4 years ago
|
||
(In reply to mattheww from comment #4)
Making remove use the same logic as add seems to fix it.
Thanks a lot for finally fixing this! It makes using the firefox dev tools every day much nicer. When will it be live in Firefox Developer Edition?
May I ask if you also could fix https://bugzilla.mozilla.org/show_bug.cgi?id=1687166 while you're at it?
It would be amazing because then I wouldn't have to waste time switching to chrome and reproducing whatever I'm doing there every time when I encounter a new Function source :)
(In reply to random_n0body from comment #6)
Thanks a lot for finally fixing this! It makes using the firefox dev tools every day much nicer. When will it be live in Firefox Developer Edition?
You're welcome, thanks for the detailed steps to reproduce. I'm just a volunteer, this is only a proposed fix, so I can't really say.
Updated•4 years ago
|
Comment 8•4 years ago
|
||
Updated•4 years ago
|
Comment 10•4 years ago
|
||
bugherder |
Description
•