Sources with parse errors are not shown in Debugger
Categories
(DevTools :: Debugger, enhancement, P2)
Tracking
(Not tracked)
People
(Reporter: Harald, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [dt-q])
Attachments
(2 files)
What were you doing?
- Load a source with syntax error: https://hilarious-gourd.glitch.me/
- Click syntax error in Console
What happened?
Source opens in tab.
What should have happened?
Should open in Debugger.
Reporter | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
In order to fix this, we need to be able to generate sources in the debugger when parsing produces an error and no resulting script. Right now the debugger assumes that sources all contain scripts, e.g. it adds sources in response to notifications about new scripts. Fixing this shouldn't be complicated, just making some adjustments to the hooks used to listen for new scripts/sources. The tricky part is deciding what to do when the page is loaded before the devtools are open. In that case parse errors in a source will cause the error to be reported and the source contents to be discarded. We want those contents to be retained, though, in case the debugger is opened later. It's probably sufficient to generate a new source in spidermonkey and hang onto it until the next compacting GC (like we do with the URLs of visited websites, bug 1572596). In that case opening the debugger soon after page load will usually allow the debugger to find the sources which contain errors, and in any case reloading with the devtools open will always let the debugger find them.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 3•5 years ago
|
||
Discussed again today that we should get around to this soon.
Updated•2 years ago
|
Updated•2 years ago
|
Description
•