For some reason my exceptions arent being thrown anymore in Visual Studio. I get the error in JSON on the response, but Visual Studio in debug mode no longer throws an error and stops Visual Studio at that error when it happens.
I have looked into posts like this:
Visual Studio not stopping on an exception being thrown
But I just want to reset where I was before, not enable exceptions one by one.
With a solution open in Visual Studio, use Debug > Windows > Exception Settings to open the Exception Settings window. Provide handlers that respond to the most important exceptions.
Use a try block around the statements that might throw exceptions. Once an exception occurs in the try block, the flow of control jumps to the first associated exception handler that is present anywhere in the call stack. In C#, the catch keyword is used to define an exception handler.
To set Visual Studio debugger options, select Tools > Options, and under Debugging select or deselect the boxes next to the General options. You can restore all default settings with Tools > Import and Export Settings > Reset all settings.
To turn off stop on exceptions press " Ctrl + Alt + E ". This will open the Exceptions window . Untick "Common Language Runtime Exceptions - Thrown". That would prevent it from pausing from within the delegate, but not when it's rethrown on Wait .
To reset the exceptions settings, go to Debug>Exceptions and click "Reset All."
You can also drill down and control what happens for different types of exceptions.
You mentioned that you are missing the User-Unhandled column. In that case, you may need to set this:
I hit a problem where it wasn't stopping on an exception and resetting the exception settings worked for me. To expand on Jay's answer above, in VS 2019 that option to reset is in a slightly different place (arguably a step backward compared to how it was before, it's clearer there).
Go to debug -> windows -> exception settings
The reset button is now this icon here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With