How to get debugger to take over when runtime error occurrs?

When a runtime error happens in a Rails project, it displays the error and stack information in the browser. Is there any way instead to have the debugger halt execution within RubyMine so that I can actually use the debugger... to inspect state and do all the other useful things you can do with a debugger?

5 comments
Comment actions Permalink

Hi Chez,

Have you tried exceptional breakpoints?
screenshot.png
Open Run | View Breakpoints action and click Add button.

Hope this helps,
Oleg

0
Comment actions Permalink

That looks interesting... what breakpoint would you suggest that I set?

And will this stop whenever that exception is reached, or only when an unhandled one is reached? (Which would be preferable).

0
Comment actions Permalink

Hi Chez,

Exceptional breakpoints in RubyMine behave the same way as catches in command line debugger do.
Thus it's important to add them only when exception you are going to catch already defined anyway you'll get an error message.
I'll recommend you to play with them in command line and check whether they suits you. In my case catchpoint halted the whole program.

Best regards,
Oleg

0
Comment actions Permalink

Wouldn't it be nice though to have the thing I requested, which is that whenever it bombed out to the browser, instead it would halt to the debugging environment?

0
Comment actions Permalink

Yes, this can be really nice feature, but I have no clue if it is possible to redirect such an output inside RubyMine. If it is possible it would be pretty easy to add hyperlinks for code navigation.

0

Please sign in to leave a comment.