共用方式為


IDebugProcess2

This interface represents a process running on a port. If the port is the local port, then IDebugProcess2 usually represents a physical process on the local machine.

IDebugProcess2 : IUnknown

Notes for Implementers

This interface is implemented by a custom port supplier to manage programs as a group. This interface must be implemented by the port supplier.

A debug engine also implements this interface if it supports launching a program through IDebugEngineLaunch2::LaunchSuspended.

Notes for Callers

This interface is called primarily by the session debug manager (SDM) in order to interact with a group of programs identified in this process.

Call IDebugProgram2::GetProcess or IDebugPort2::GetProcess to get this interface. This interface is also returned by calling IDebugEngineLaunch2::LaunchSuspended.

Methods in Vtable Order

The following table shows the methods of IDebugProcess2.

Method

Description

IDebugProcess2::GetInfo

Gets a description of the process.

IDebugProcess2::EnumPrograms

Enumerates the programs that are contained in this process.

IDebugProcess2::GetName

Gets the title, friendly name, or file name of the process.

IDebugProcess2::GetServer

Gets the instance of a machine server this process is running on.

IDebugProcess2::Terminate

Terminates the process.

IDebugProcess2::Attach

Attaches to the process.

IDebugProcess2::CanDetach

Determines if the SDM can detach the process.

IDebugProcess2::Detach

Detaches the debugger from the process.

IDebugProcess2::GetPhysicalProcessId

Gets the system process identifier.

IDebugProcess2::GetProcessId

Gets a globally unique identifier for this process.

IDebugProcess2::GetAttachedSessionName

[DEPRECATED]

Gets the name of the session that is debugging the process.

[DEPRECATED. SHOULD ALWAYS RETURN E_NOTIMPL.]

IDebugProcess2::EnumThreads

Enumerates the threads running in the process.

IDebugProcess2::CauseBreak

Requests that the next program running code in this process stop.

IDebugProcess2::GetPort

Gets the port that this process is running on.

Remarks

An IDebugProcess2 contains one or more IDebugProgram2 interfaces.

Requirements

Header: Msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See Also

Reference

IDebugPort2::GetProcess

IDebugEngineLaunch2::LaunchSuspended

IDebugProgram2::GetProcess

IEnumDebugProcesses2::Next

IDebugPortEvents2::Event

IDebugEngineLaunch2

IDebugEventCallback2::Event

IDebugProgram2

Concepts

Core Interfaces