Skip to Main Content
Professional Visual Studio® 2008
book

Professional Visual Studio® 2008

by Nick Randolph, David Gardner
July 2008
Intermediate to advanced content levelIntermediate to advanced
1026 pages
27h 59m
English
Wrox
Content preview from Professional Visual Studio® 2008

45.3. Debugging Running Applications

Sometimes you'll need to debug an application that is running outside Visual Studio. There are many reasons why you would want to do this, such as if a defect appears only when an application is executed in production. Fortunately, Visual Studio provides a simple method for attaching and debugging a Windows executable or web application that is actively running.

45.3.1. Attaching to a Windows Process

Attaching to a running Windows process is a fairly straightforward task in Visual Studio. Ideally, you will have the original source code open in Visual Studio, in which case you will be able to debug the process as if you had launched it in debug mode from Visual Studio.

If you are debugging an executable without access to the source code, the available debugging features are limited. If the executable was built without debug information or symbols, available features are further limited and it is unlikely that you will gain much useful information by debugging it in this way.

From the Debug menu, use the Attach to Process command. This displays the Attach to Process dialog window (see Figure 45-5) from which you can browse all active processes. Locate the application that you wish to debug from the Available Processes list and click the Attach button.

Figure 45.5. Figure 45-5

Because attaching to an application requires these manual steps, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson

Publisher Resources

ISBN: 9780470229880Purchase book