7.10. Debugging Unhandled Exceptions Using Visual Studio

Do be aware that Visual Studio 2010 supplies a number of tools that help you debug unhandled custom exceptions. Again, assume you have increased the speed of a Car object beyond the maximum. If you start a debugging session within Visual Studio 2010 (using the Debug Start Debugging menu selection), Visual Studio automatically breaks at the time the uncaught exception is thrown. Better yet, you are presented with a window (see Figure 7-4) displaying the value of the Message property.

Figure 7.4. Debugging unhandled custom exceptions with Visual Studio 2010

NOTE

If you fail to handle an ...

Get Pro C# 2010 and the .NET 4 Platform, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.