Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This interface represents a program that is running in a process.
IDebugProgram2 : IUnknown
Notes for Implementers
The debug engine (DE) and a custom port supplier implement this interface to represent a program in a process. The session debug manager (SDM) also implements this interface to provide information to IDebugProgram2::Attach.
Notes for Callers
The IDebugProgramCreateEvent2 event returns this interface for a new program. This interface is also used as a parameter for many methods on multiple interfaces.
Methods in Vtable Order
The following table shows the methods of IDebugProgram2.
| Method | Description | 
|---|---|
| Enumerates the threads that are running in this program. | |
| Gets the name of the program. | |
| Gets the process that this program is running in. | |
| Terminates this program. | |
| Attaches to this program. | |
| Determines if a debug engine (DE) can detach from the program. | |
| Detaches the debugger from this program. | |
| Gets a globally unique identifier for this program. | |
| Gets program properties. | |
| Continues running this program from a stopped state. Any previous execution state is cleared. | |
| Continues running this program from a stopped state. Any previous execution state is preserved. | |
| Performs a step. | |
| Requests that this program stop execution the next time one of its threads runs code. | |
| Gets the name and identifier of the debug engine (DE) running this program. | |
| Enumerates the code contexts for a given position in a source file. | |
| Gets the memory bytes for this program. | |
| Gets the disassembly stream for this program or part of this program. | |
| Enumerates the modules that this program has loaded and is executing. | |
| Gets the Edit and Continue (ENC) update for this program. A custom debug engine does not implement this method (it should always return E_NOTIMPL). | |
| Enumerates the code paths of this program. | |
| Writes a dump to a file. | 
Requirements
Header: msdbg.h
Namespace: Microsoft.VisualStudio.Debugger.Interop
Assembly: Microsoft.VisualStudio.Debugger.Interop.dll
Remarks
A program is a thread container running in a particular run-time architecture, while a process is made up of one or more programs.