IDebugThread2
This interface represents a thread running in a program.
IDebugThread2 : IUnknown
Notes for Implementers
The debug engine (DE) implements this interface to represent a thread of execution in a single program.
Notes for Callers
Call IDebugStackFrame2::GetThread to obtain this interface representing the currently active thread.
This interface is also used in creating a breakpoint request (see BP_REQUEST_INFO).
This interface is also returned when resolving a bound or error breakpoint (see BP_RESOLUTION_INFO and BP_ERROR_RESOLUTION_INFO).
Methods in Vtable Order
The following table shows the methods of IDebugThread2.
Method |
Description |
---|---|
Retrieves a list of the stack frames for this thread. |
|
Gets the name of the thread. |
|
Sets the name of the thread. |
|
Gets the program in which a thread is running. |
|
Determines whether the next statement can be set to the given stack frame and code context. |
|
Sets the next statement to the given stack frame and code context. |
|
Gets the system thread identifier. |
|
Suspends a thread. |
|
Resumes a thread. |
|
Gets properties that describe a thread. |
|
Gets the logical thread associated with this physical thread. |
Remarks
Because a single physical thread can run in multiple programs, more than one IDebugThread2 from more than one program can represent the same physical thread.
When a breakpoint or exception occurs, an event is sent by calling IDebugEventCallback2::Event. One of the arguments to this method is an IDebugThread2 interface representing the current thread. IDebugThread2::EnumFrameInfo is used to obtain the IDebugStackFrame2 interface for the current stack frame.
Requirements
Header: msdbg.h
Namespace: Microsoft.VisualStudio.Debugger.Interop
Assembly: Microsoft.VisualStudio.Debugger.Interop.dll