Chapter 44

Advanced Debugging Techniques


  • Adding debugging actions to your code with the Debug and Trace classes
  • Learning techniques for debugging applications already running on the local or remote computer
  • Debugging multithreaded applications, SQL Server stored procedures, and mixed-mode applications

As you’ve seen throughout the last several chapters, Visual Studio 2012 comes with a great variety of ways to debug and run through your applications, including catching errors and displaying them to you for action before the code executes too far; a number of techniques for effectively debugging web applications; and other features, such as breakpoints and visualizing errors.

However, there is still more functionality in Visual Studio that you can use to customize your experience with debugging projects, databases, unmanaged code, and even the .NET Framework. In this chapter you find advanced techniques for debugging your projects regardless of language or technology.


Visual Studio provides several ways to launch applications at the start of a debugging session. For most projects the default start option will be sufficient, which in the case of a Windows executable launches the program directly. In the case of a web application, Visual Studio opens the default web browser and loads the current page or navigates to the root path of the web application if there is no active page.

In some scenarios you may want a different action to occur during ...

Get Professional Visual Studio 2012 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.