Supported Event Types
Visual Studio debugging currently supports the following event types:
Asynchronous events
Notify the session debug manager (SDM) and IDE that the state of the application being debugged is changing. These events are processed at the leisure of the SDM and the IDE. No reply is sent to the debug engine (DE) once the event is processed. The IDebugOutputStringEvent2 and IDebugMessageEvent2 interfaces are examples of asynchronous events.
Synchronous events
Notify the SDM and IDE that the state of the application being debugged is changing. The only difference between these events and asynchronous events is that a reply is sent by means of the IDebugEngine2::ContinueFromSynchronousEvent method.
Sending a synchronous event is useful if you need your DE to continue processing after the IDE receives and processes the event.
Synchronous stopping events, or stopping events
Notify the SDM and the IDE that the application being debugged has stopped executing code. When you send a stopping event by means of the method IDebugEventCallback2::Event, the IDebugThread2 parameter is required. Stopping events are continued by a call to the one of the following methods:
The interfaces IDebugBreakpointEvent2 and IDebugExceptionEvent2 are examples of stopping events.
Hinweis
Asynchronous stopping events are not supported. It is an error to send an asynchronous stopping event.
Discussion
The actual implementation of events depends on the design of your DE. The type of each event sent is determined by its attributes, which are set when you design the DE. For example, one DE may send an IDebugProgramCreateEvent2 as an asynchronous event, while another may send it as a stopping event.
The following table specifies which program and thread parameters are required for which events, as well as event types. Any event can be synchronous. No event needs to be synchronous.
Hinweis
The IDebugEngine2 interface is required for all events.
Event |
IDebugProgram2 |
IDebugThread2 |
Stopping Events |
---|---|---|---|
Allowed, but not required |
Allowed, but not required |
No |
|
Required |
Required |
Yes |
|
Allowed, but not required |
Allowed, but not required |
No |
|
Allowed, but not required |
Allowed, but not required |
No |
|
Allowed, but not required |
Allowed, but not required |
No |
|
Required |
Required |
Yes |
|
Required |
Required |
No |
|
Not allowed |
Not allowed |
No |
|
Not allowed |
Not allowed |
No |
|
Required |
Required |
Yes |
|
Allowed, but not required |
Allowed, but not required |
Can be |
|
Required |
Required |
Yes |
|
Allowed, but not required |
Allowed, but not required |
Can be |
|
Required |
Required |
Yes |
|
Required |
Required |
Yes |
|
Allowed, but not required |
Allowed, but not required |
Can be |
|
Required |
Allowed, but not required |
No |
|
Allowed, but not required |
Allowed, but not required |
No |
|
Required |
Allowed, but not required |
No |
|
Required |
Allowed, but not required |
No |
|
Required |
Allowed, but not required |
No |
|
Required |
Allowed, but not required |
No |
|
Allowed, but not required |
Allowed, but not required |
No |
|
IDebugStopCompleteEvent2 |
Required |
Required |
Yes |
Required |
Required |
Yes |
|
Allowed, but not required |
Allowed, but not required |
No |
|
Required |
Required |
No |
|
Required |
Required |
No |
|
Allowed, but not required |
Allowed, but not required |
No |