Share via


IDebugProcess2

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

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.

Syntax

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 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 GetProcess or 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
GetInfo Gets a description of the process.
EnumPrograms Enumerates the programs that are contained in this process.
GetName Gets the title, friendly name, or file name of the process.
GetServer Gets the instance of a machine server this process is running on.
Terminate Terminates the process.
Attach Attaches to the process.
CanDetach Determines if the SDM can detach the process.
Detach Detaches the debugger from the process.
GetPhysicalProcessId Gets the system process identifier.
GetProcessId Gets a globally unique identifier for this process.
GetAttachedSessionName

[DEPRECATED]
Gets the name of the session that is debugging the process.

[DEPRECATED. SHOULD ALWAYS RETURN E_NOTIMPL.]
EnumThreads Enumerates the threads running in the process.
CauseBreak Requests that the next program running code in this process stop.
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