Skip to content

Conversation

@st0012
Copy link
Member

@st0012 st0012 commented May 10, 2022

I can understand the default is designed as a convenient way to stop users' programs when an error happens. But because exception breakpoints stop when the errors are raised and don't care about if they'd be rescued, they can stop at unnecessary places. For example, the user's Rails app already handles the exception with a rescue_from callback, but he/she will still be stopped regardless.

I actually got multiple complaints/questions about it recently at Shopify as we're pushing for debugger adoption:

Quick question - I'm using the debug gem in spin but it breaks every time it comes across a raise. Is this expected behaviour? If so, how can I turn it off and only break on my breakpoints?

From another user:

the only annoying moment was with checkboxes in left down corner in Breakpoints section which said “Stop on every exception” and we didn’t noticed it was checked by default. If you turn it off the debugging is much more convenient

To cancel it, they need to find and untick the breakpoint at bottom-left corner, which is not super obvious:

image

So I think it's best to not activate it by default, but tell users to opt-in this convenient breakpoint if they're debugging an exception-related issue in a document (which we can work on in the future).

@ko1 ko1 merged commit 2586199 into ruby:master May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants