tk.
tk.

Reputation: 1216

debugger does not stop on error

I'm working on Asp.net MVC4 project using Visual Studio 2012.

When there's an error during debugging, it used to stop on the error.

But suddenly, the debugger does not stop and just spit out the error information webpage like below.

Server Error in '/' Application.

The given key was not present in the dictionary.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

Source Error: ...

Stack Trace: ...

How can I set the debugger to stop on the error?

Upvotes: 8

Views: 8082

Answers (2)

Bassem
Bassem

Reputation: 820

I had the same problem, even my debugging options are the same as @John Koerner. I found that not all exception types are enabled to break the solution by default. You can choose which are enabled from the Exception Setting window.

VS2015: Debug -> Windows -> Exception Settings.

VS2012: Debug -> Exceptions more details

I enabled the whole CLR Exceptions set.

Upvotes: 7

John Koerner
John Koerner

Reputation: 38087

Make sure the exception assistant is enabled:

enter image description here

Upvotes: 6

Related Questions