castwide / vscode-ruby-debug

A Ruby debugger.
https://marketplace.visualstudio.com/items?itemName=castwide.ruby-debug
Other
28 stars 3 forks source link

Code pauses on every raise #20

Open Nowaker opened 2 years ago

Nowaker commented 2 years ago

Your environment

Expected behavior

Debugger pauses on breakpoints I pick only.

Actual behavior

Debugger pauses on any raise. I do not want that. I can continue but it breaks again on another raise. Which is endless.

image

Feature request

Like in Node.js - let me choose whether debugger should pause on exceptions, and which exceptions (caught / uncaught):

image

castwide commented 2 years ago

This might be possible, but it probably won't be trivial. Right now, it's an all-or-nothing deal because the debugger is unable to determine whether an exception will be rescued at the moment the exception gets raised. One possible solution is for the debugger itself to rescue the exception at a stack level above the application. I'll look into it.

Nowaker commented 2 years ago

@castwide If it's not trivial, I'd suggest a simple checkbox to pause on exceptions (current behavior) or not to pause (new behavior).

castwide commented 2 years ago

That checkbox should already be available. If you don't see it, you might be using an older version of the readapt gem (current version is 1.4.3).

image