I've set up the ruby-debug-ide
and debase
gems in my Rails application so that I can use VS Code's built-in debugging tools.
During development, I would like any exception to trigger a breakpoint and start the debugger in VS Code. How can I set this up?
I was unable to do this using
debase
and recommend using gemdebug
instead, along with extension "VSCode rdbg Ruby Debugger".You'll get a "rescue any exception" breakpoint which works (though I wasn't able to get it to rescue only uncaught exceptions).
See https://github.com/ruby/vscode-rdbg and https://github.com/ruby/debug
This is the launch.json for my rails application