Debug does not stop on errors.
-
Previously when debugging my program would stop if an error occured, this no longer works. Now I have to hunt down the error which takes hours sometimes. Is there an option / setting I can change in order to stop on the error as it occurs. I appreciate any help. Thanks in advance. Michael
-
Previously when debugging my program would stop if an error occured, this no longer works. Now I have to hunt down the error which takes hours sometimes. Is there an option / setting I can change in order to stop on the error as it occurs. I appreciate any help. Thanks in advance. Michael
Perhaps you are missing this: [Manage exceptions with the debugger - Visual Studio | Microsoft Docs](https://docs.microsoft.com/en-us/visualstudio/debugger/managing-exceptions-with-the-debugger?view=vs-2019)
Quote:
You can tell the debugger which exceptions or sets of exceptions to break on, and at which point you want the debugger to break (that is, pause in the debugger)
Try out.
For your read/comments: Beginner’s Guide to understand Kafka Beginners Quick Start to Learn React.js
-
Previously when debugging my program would stop if an error occured, this no longer works. Now I have to hunt down the error which takes hours sometimes. Is there an option / setting I can change in order to stop on the error as it occurs. I appreciate any help. Thanks in advance. Michael
Debuggers don't "stop on errors" they stop either because they hit a breakpoint you set, or an exception occurs that you aren't handling (or that is in the "break on this exception" list your project has set). It's worth checking two things: 1) That you are actually running your app in the debugger. Yes, yes - I know that's obvious. But you'd be surprised how many people ignore the obvious ... :laugh: 2) That you haven't switched exceptions off: Go to "Debug...Windows...Exception Settings" and check that "Common Language Runtime Exceptions" is a solid black. But logic errors in your code the debugger won't automatically stop on - it has no idea what you are trying to do, so it can't! (But you knew that anyway ...)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Debuggers don't "stop on errors" they stop either because they hit a breakpoint you set, or an exception occurs that you aren't handling (or that is in the "break on this exception" list your project has set). It's worth checking two things: 1) That you are actually running your app in the debugger. Yes, yes - I know that's obvious. But you'd be surprised how many people ignore the obvious ... :laugh: 2) That you haven't switched exceptions off: Go to "Debug...Windows...Exception Settings" and check that "Common Language Runtime Exceptions" is a solid black. But logic errors in your code the debugger won't automatically stop on - it has no idea what you are trying to do, so it can't! (But you knew that anyway ...)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
OriginalGriff wrote:
an exception occurs that you aren't handling (and that is in the "break on this exception" list your project has set)
The "break on this exception" setting overrides the unhandled part. You use it to break on exceptions which are handled in code. The debugger will always break on unhandled exceptions. Manage exceptions with the debugger - Visual Studio | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
OriginalGriff wrote:
an exception occurs that you aren't handling (and that is in the "break on this exception" list your project has set)
The "break on this exception" setting overrides the unhandled part. You use it to break on exceptions which are handled in code. The debugger will always break on unhandled exceptions. Manage exceptions with the debugger - Visual Studio | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Monday morning mode ... :doh:
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!