Focus is lost on the current line when debugging userscripts
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(Not tracked)
People
(Reporter: roman.deev06, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:136.0) Gecko/20100101 Firefox/136.0
Steps to reproduce:
137.0a1 (2025-02-18) (aarch64)
(and 136.0b6)
- Install Violentmonkey https://addons.mozilla.org/firefox/addon/violentmonkey
- Install the userscript https://gist.github.com/deevroman/d07f0cc0f09cafd9e50ebf3908148bbc/raw/557c2e298d220f0d4ebcae756a8a394f095fb650/debugger-bug.user.js
- Open a debugger
- Open https://www.openstreetmap.org
- Reload the page.
6.1 Drag the mouse over the inline preview of the html element (video_1_hover.mp4)
6.2 Or start typing a CSS selector call to the console, for example:document.querySelector("body")
(video_2_console.mp4)
Actual results:
The focus of the current debugger position is moved to another source file. The continue debugging buttons become inactive.
Expected results:
The focus doesn't move. The debugger buttons continue to work.
Reporter | ||
Comment 1•19 days ago
|
||
Reporter | ||
Comment 2•19 days ago
|
||
Comment 3•19 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Debugger' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 4•19 days ago
|
||
Looks like the selected thread changes to content page main thread, which is not paused.
For the record you can switch back to the content script thread by selecting it on the right and then the UI should show that you are paused again.
Reporter | ||
Comment 5•19 days ago
|
||
I understand this and on video_2 I show it. But this is a regression, this has not happened before (I think it broke in 135 beta)
- What if I have more than a dozen extensions? (this is not a guess, I really have out a lot in Firefox Beta) What if the list of threads is collapsed? This greatly degrades the debugging UX.
- Why is it that when I return to the script thread, I can safely move the mouse over inline hints and not be moved to the main thread?
Comment 6•19 days ago
|
||
Nicolas will take a look, this seems related to the initialization of the inspector.
And it is indeed a regression because the content scripts used to be debugged from the main thread/
Comment 7•19 days ago
|
||
Note that it is the same issue as bug 1837480 comment 8
Comment 8•14 days ago
|
||
(In reply to Alexandre Poirot [:ochameau] from comment #7)
Note that it is the same issue as bug 1837480 comment 8
Indeed thanks, I will close this one and bump the priority of the other one.
Reporter | ||
Comment 9•18 hours ago
|
||
Bug 1837480 was closed for resolved and I can see that it should have been fixed in nightly / mac / deee0cffec33 / 138.0a1 / 20250306213030
But I still reproduce the steps described in this bug in 138.0a1 (2025-03-08) (aarch64)
Description
•