Allow to add breakpoints to console evaluated source in the debugger
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: 709922234, Unassigned)
References
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0
Steps to reproduce:
- open webconsole
- input script, e.d:
class A { #a = 1; a(b) { b.#a }} new A().a()
- When an error occurs, click stack to debug and add breakpoints;
- Re-input the code for debugging
Actual results:
Some errors cannot be clicked on stack to open debugger. Debugger cannot be paused at breakpoints.
Expected results:
Can be debugged
Similar to chrome
Updated•24 days ago
|
Comment 3•23 days ago
|
||
Regarding the malfunctioning links, I filed Bug 1962358 to take care of the fact that the error message location wasn't working.
Then there's the case of the error object stacktrace, which is constructed from error.stack string, and thus doesn't hold proper source ids.
Making breakpoints to work would require some changes in the Debugger. At the moment, every evaluation is creating a different source. Adding a breakpoint on such already evaluated source won't be triggered when a new source is created from evaluation. We would need to somehow have a Map of the evaluated sources by the text content (and the context the evaluation occurred in).
Alternatively, we have Bug 1869292 on file to add the ability to set breakpoints from the console multiline input that would make this possible.
For now, the workaround is to add a debugger
statement in the evaluated expression so the debugger would pause on the source when hitting the statement.
Updated•17 days ago
|
Comment 4•17 days ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #3)
Then there's the case of the error object stacktrace, which is constructed from error.stack string, and thus doesn't hold proper source ids.
Filed Bug 1963547 for this
Description
•