19

I can't find the option in JetBrains Project Rider to "Break on Exception". Where I would normally add an exception breakpoint in IntelliJ, I see this:

enter image description here

csauve
  • 5,904
  • 9
  • 40
  • 50

2 Answers2

31

There are two ways to do this.

Break on all exceptions

Go to Run | View Breakpoints.... Click the green + icon. Select Stop on all .NET exceptions.

enter image description here

You can then modify the breakpoint:

enter image description here


Break on a specific exception

Either use:

  • Run | Stop on exception...
  • Run | View Breakpoints.... Click the green + icon. Select .NET exception breakpoints.

Either approach will give you the following UI where you can search for an exception type:

enter image description here

To manage the settings, use the Breakpoints dialog.

Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
  • 3
    I do not have a "Stop on all .NET exceptions" option in that dropdown. – Walt D Dec 14 '20 at 19:52
  • Thanks, this fixed it for me. But I'm wondering why this is not the default behavior and we need to explicitly turn it on ? – Nam Le May 04 '22 at 02:37
  • The menu options have changed but you can try selecting `CLR Exception Breakpoints` (and `Exception Breakpoints`) in the current version – Taran Jun 01 '23 at 07:42
5

Break on specific exceptions is not implemented yet. Now Rider can break only on unhandled exceptions. Will come soon.

  • How do I break only on unhandled exceptions? – csauve Aug 26 '16 at 16:04
  • 2
    Debugger should be paused automatically when unhandled exception occurs. – Artem Bukhonov Aug 30 '16 at 15:28
  • After additional testing, we may be going by different interpretations of "unhandled". I was considering an exception that is thrown back to a certain layer (in this case MVC entry point) to be unhandled: https://youtrack.jetbrains.com/issue/RIDER-2066 – csauve Aug 31 '16 at 20:28
  • This answer is obsolete. Rider now supports this feature. – Mark Meuer Aug 31 '23 at 21:13