Conditional breakpoints should not pause on exceptions
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: jlast, Assigned: chujunlu)
References
(Blocks 1 open bug)
Details
Attachments
(1 obsolete file)
I've found it pretty confusing when conditional breakpoints pause with exceptions:
- in this case, the user expects something good to have happened and it can be hard to find the exception and debug the condition
- sometimes the expression throws a lot when a function is called at times you do not care about it... like initialization
- chrome does not pause on exceptions, which led me to believe neither would firefox
It looks like this was added because it can be confusing to not pause for typos. I think terminal style autocomplete should help with this quite a bit.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
+1 for Chrome parity, and this also allows to be more lax with expressions and type checking.
To allow the old behavior, would it make sense to pause when "pause on caught exception" is enabled?
Comment 2•4 years ago
|
||
+1 to what Harald said. Does the "why" pause reason display the correct message? That's something we should look at as well.
Comment 3•4 years ago
|
||
Agree with what was said above
To sum up:
- Chrome parity
- I like the idea to pause when "pause on caught exception" or "Pause on exceptions"? is on.
- It would be nice to see the exception in the Console (+ indication that it comes from conditional BP from given file/line)
- Showing explanatory message in the Callstack would also be helpful (perhaps with a link to the exception log in the Console)
Honza
Comment 4•4 years ago
|
||
I agree that pausing in them is confusing and likely not what the user expects.
I'm not sure catching with pause on caught exception would be that useful in most cases since they are usually small snippets, and it may well still be common for them to throw in some cases.
I do agree that it could be nice to log the exceptions to the console.
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Hey @jlast, I'm interested in this bug.
When "Pause on exception" is checked, and I refresh the page to execute code, a new file is opened to show conditional breakpoint expression's error. That's different from other scenarios. I documented all scenarios in
https://docs.google.com/spreadsheets/d/1VIQpKgFHv8AhgwUYZ1JaQBr3AOSZojnlcSi6VB4gWUQ/edit?usp=sharing
For now, I remove the pause and log an error message in the console, if "Pause on exception" is unchecked. If "Pause on exception" is checked, I keep the old behaviors. I'm not sure if you want not to pause even when "Pause on exception" is checked. I'd like to check with you before I proceed to edit tests. Thanks!
test_conditional_breakpoint-03.js tests the behavior of the last case in the Google sheet.
I'm not sure if it's the correct way to test a breakpoint doesn't pause in test_conditional_breakpoint-04.js. Look forward to your feedback.
Updated•3 years ago
|
Pushed by jlaster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e1415c18f96d Invalid conditional breakpoint only pauses when pauseOnExceptions is checked
Comment 8•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•