Breakpoints are not hit when debugging xpcshell tests
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(firefox91 fixed)
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Another similar bug to Bug 1697184, it seems breakpoints are broken for xpc-shell debugging.
STRs:
- run
./mach test test_extensions_path.js --jsdebugger
- connect to localhost:6000 with about:debugging
- (here the test should break on the first line)
- set a breakpoint anywhere in the test
- resume
ER:
The test execution should stop on the breakpoint
AR:
The test doesn't stop.
Note: as a workaround, debugger;
statements are still working.
Comment 1•4 years ago
|
||
I think I've seen this and it is similar to the bug around breakpoints not being applied until you restart.
If you restart both the test and the debugger without changing the breakpoints, I think you'll then find the breakpoint being hit.
Updated•4 years ago
|
Comment 2•3 years ago
|
||
I can confirm this bug on macOS and on Windows, and I can confirm that the workaround from #c1 works. In fact, I didn't need to restart the browser hosting the debugger; I just needed to restart the test.
Do we have a path to addressing this? I'm seeing the same issue with my WIP for Bug 1686344. More importantly, can we add a test for this behaviour?
Comment 3•3 years ago
|
||
Sorry for the delay, missed this NI.
It's not our top priority atm (P3, since there is a workaround), but it's something we want to have fixed.
Julian, how much work is this? Do you think you could look at this at some point?
Assignee | ||
Comment 4•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
I attached a patch that fixes the issue but it's mostly to explain the issue.
The xpcshell target actor is a "content process target actor" which actually lives in the parent process. It supports watcher APIs, but since it lives in the parent process it should be handled similarly to ParentProcess targets or BrowsingContext targets for parent process pages.
Tldr, I modified _getTargetActorInParentProcess so that it would also return xpcshell targets, but maybe :ochameau would have other suggestions to address this.
I'll try to look at a test, maybe we can modify devtools/server/tests/xpcshell/test_xpcshell_debugging.js to also assess the setting breakpoints (at the moment, it only checks debugger statements).
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
(In reply to Nick Alexander :nalexander [he/him] from comment #2)
More importantly, can we add a test for this behaviour?
FWIW, we are landing a test for dynamically added breakpoints together with the patch
Comment 8•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•