Equivalent of "Break on All Errors" in VB.NET
-
Hi, I switched over from VB6 to VB.NET. In VB6 when we wanted to temprorily disable error handling, we used "Break on all Errors". How do we disable error handling in VB.NET? I've Got stuck in a procedure that has a lot of code between the try...catch block and many nested try.. catch blocks too. I want to know which part of the code is generating errors. Please help. Thanks,
-
Hi, I switched over from VB6 to VB.NET. In VB6 when we wanted to temprorily disable error handling, we used "Break on all Errors". How do we disable error handling in VB.NET? I've Got stuck in a procedure that has a lot of code between the try...catch block and many nested try.. catch blocks too. I want to know which part of the code is generating errors. Please help. Thanks,
Do the errors not throw exceptions? If they do have you tried checking the stack trace for the error? That should at least point you in the right direction.
-
Hi, I switched over from VB6 to VB.NET. In VB6 when we wanted to temprorily disable error handling, we used "Break on all Errors". How do we disable error handling in VB.NET? I've Got stuck in a procedure that has a lot of code between the try...catch block and many nested try.. catch blocks too. I want to know which part of the code is generating errors. Please help. Thanks,
There is no equivilent in VB.NET. Set breakpoints in your catch statements and look at the stack trace, or set them at the beginning of your Try blocks and step through the code line by line, or comment out the Try/Catch statements, or instrument your code and log critical information you need to trace back the errors.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Hi, I switched over from VB6 to VB.NET. In VB6 when we wanted to temprorily disable error handling, we used "Break on all Errors". How do we disable error handling in VB.NET? I've Got stuck in a procedure that has a lot of code between the try...catch block and many nested try.. catch blocks too. I want to know which part of the code is generating errors. Please help. Thanks,
You said you want to know what part of the code is generating errors. It sounds to me like you actually want the errors to happen as though there is no try...catch block. You can accomplish this by going to Debug > Exceptions and then checking the checkbox for 'common language runtime exceptions' under the 'thrown' column. This should cause the program to break when an error occurs even if it's in the try...catch block.