IDebugProgram2

This interface represents a program that is running in a process.

Syntax

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 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
EnumThreads Enumerates the threads that are running in this program.
GetName Gets the name of the program.
GetProcess Gets the process that this program is running in.
Terminate Terminates this program.
Attach Attaches to this program.
CanDetach Determines if a debug engine (DE) can detach from the program.
Detach Detaches the debugger from this program.
GetProgramId Gets a globally unique identifier for this program.
GetDebugProperty Gets program properties.
Execute Continues running this program from a stopped state. Any previous execution state is cleared.
Continue Continues running this program from a stopped state. Any previous execution state is preserved.
Step Performs a step.
CauseBreak Requests that this program stop execution the next time one of its threads runs code.
GetEngineInfo Gets the name and identifier of the debug engine (DE) running this program.
EnumCodeContexts Enumerates the code contexts for a given position in a source file.
GetMemoryBytes Gets the memory bytes for this program.
GetDisassemblyStream Gets the disassembly stream for this program or part of this program.
EnumModules Enumerates the modules that this program has loaded and is executing.
GetENCUpdate 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).
EnumCodePaths Enumerates the code paths of this program.
WriteDump 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.

See also