Condividi tramite


IDebugProgram2

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

IDebugProgram2::EnumThreads

Enumerates the threads that are running in this program.

IDebugProgram2::GetName

Gets the name of the program.

IDebugProgram2::GetProcess

Gets the process that this program is running in.

IDebugProgram2::Terminate

Terminates this program.

IDebugProgram2::Attach

Attaches to this program.

IDebugProgram2::CanDetach

Determines if a debug engine (DE) can detach from the program.

IDebugProgram2::Detach

Detaches the debugger from this program.

IDebugProgram2::GetProgramId

Gets a globally unique identifier for this program.

IDebugProgram2::GetDebugProperty

Gets program properties.

IDebugProgram2::Execute

Continues running this program from a stopped state. Any previous execution state is cleared.

IDebugProgram2::Continue

Continues running this program from a stopped state. Any previous execution state is preserved.

IDebugProgram2::Step

Performs a step.

IDebugProgram2::CauseBreak

Requests that this program stop execution the next time one of its threads runs code.

IDebugProgram2::GetEngineInfo

Gets the name and identifier of the debug engine (DE) running this program.

IDebugProgram2::EnumCodeContexts

Enumerates the code contexts for a given position in a source file.

IDebugProgram2::GetMemoryBytes

Gets the memory bytes for this program.

IDebugProgram2::GetDisassemblyStream

Gets the disassembly stream for this program or part of this program.

IDebugProgram2::EnumModules

Enumerates the modules that this program has loaded and is executing.

IDebugProgram2::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).

IDebugProgram2::EnumCodePaths

Enumerates the code paths of this program.

IDebugProgram2::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

Reference

IDebugThread2::GetProgram

IEnumDebugPrograms2::Next

IDebugPortEvents2::Event

IDebugEngine2::Attach

IDebugEngine2::DestroyProgram

IDebugEventCallback2::Event

IDebugProgramNode2::Attach_V7

Concepts

Core Interfaces