Reputation: 46589
When debugging a C# program with Visual Studio, how can you see if the code you're stepping through is in a try/catch block?
That is, if the code throws an exception, will the exception be caught by another part of the program or not?
The problem is that there's an application which is prone to crashing when used out in the wild, but we can't replicate the problem here under the debugger, and we think that all exceptions are caught, but apparently we're wrong!
And it's a large program, with lots of classes and event handlers and timers, so it's not always straightforward in which order things are executed.
So, how can you tell which parts of a program have potential uncaught exceptions, other than stepping up through the call stack constantly to see if you find a try
?
Upvotes: 2
Views: 102