Project Rider - Break on Exception
Asked Answered
P

2

23

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

Probabilism answered 25/8, 2016 at 16:9 Comment(2)
Rider doesn't support this feature for now. I have created an issue: youtrack.jetbrains.com/issue/RIDER-1974Saccharide
That feature is supported now. See @drew-noakes answer.Vulture
G
5

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

Grappling answered 25/8, 2016 at 21:36 Comment(4)
How do I break only on unhandled exceptions?Probabilism
Debugger should be paused automatically when unhandled exception occurs.Grappling
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: youtrack.jetbrains.com/issue/RIDER-2066Probabilism
This answer is obsolete. Rider now supports this feature.Vulture
V
38

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.

Victoriavictorian answered 3/9, 2017 at 19:48 Comment(4)
I do not have a "Stop on all .NET exceptions" option in that dropdown.Abukir
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 ?Nambypamby
The menu options have changed but you can try selecting CLR Exception Breakpoints (and Exception Breakpoints) in the current versionLimit
Looks like the new UI looks like thisHorsecar
G
5

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

Grappling answered 25/8, 2016 at 21:36 Comment(4)
How do I break only on unhandled exceptions?Probabilism
Debugger should be paused automatically when unhandled exception occurs.Grappling
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: youtrack.jetbrains.com/issue/RIDER-2066Probabilism
This answer is obsolete. Rider now supports this feature.Vulture

© 2022 - 2024 — McMap. All rights reserved.