The Science of Debugging
Chapter 7


7.5.4 Attaching MSVC to an already-running process

Attaching MSVC to an already running process is a simple affair, as long as you have MSVC version 5 or later. Previous versions of MSVC simply didn't have the capability to work like that. Simply go to Build Start DebugAttach to Process, and choose your process from the popup box list.

A word of warning: unlike GDB, there is no way to detach from a process. If you close the debugger, or choose to 'stop debugging', the process you were running will die. Since this is probably not what you want to happen in most cases, you're probably going to have to deal without attaching to processes.



Index
7.5.4 Altering Data in a Running Program