Supported Event Types

Note

This article applies to Visual Studio 2015. 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

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 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 Event, the IDebugThread2 parameter is required. Stopping events are continued by a call to the one of the following methods:

    Note

    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.

Note

The IDebugEngine2 interface is required for all events.

Event IDebugProgram2 IDebugThread2 Stopping Events
IDebugActivateDocumentEvent2 Allowed, but not required Allowed, but not required No
IDebugBreakEvent2 Required Required Yes
IDebugBreakpointBoundEvent2 Allowed, but not required Allowed, but not required No
IDebugBreakpointErrorEvent2 Allowed, but not required Allowed, but not required No
IDebugBreakpointUnboundEvent2 Allowed, but not required Allowed, but not required No
IDebugBreakpointEvent2 Required Required Yes
IDebugCanStopEvent2 Required Required No
IDebugDocumentTextEvents2 Not allowed Not allowed No
IDebugEngineCreateEvent2 Not allowed Not allowed No
IDebugEntryPointEvent2 Required Required Yes
IDebugErrorEvent2 Allowed, but not required Allowed, but not required Can be
IDebugExceptionEvent2 Required Required Yes
IDebugExpressionEvaluationCompleteEvent2 Allowed, but not required Allowed, but not required Can be
IDebugInterceptExceptionCompleteEvent2 Required Required Yes
IDebugLoadCompleteEvent2 Required Required Yes
IDebugMessageEvent2 Allowed, but not required Allowed, but not required Can be
IDebugModuleLoadEvent2 Required Allowed, but not required No
IDebugOutputStringEvent2 Allowed, but not required Allowed, but not required No
IDebugProgramCreateEvent2 Required Allowed, but not required No
IDebugProgramDestroyEvent2 Required Allowed, but not required No
IDebugPropertyCreateEvent2 Required Allowed, but not required No
IDebugPropertyDestroyEvent2 Required Allowed, but not required No
IDebugReturnValueEvent2 Allowed, but not required Allowed, but not required No
IDebugStopCompleteEvent2 Required Required Yes
IDebugStepCompleteEvent2 Required Required Yes
IDebugSymbolSearchEvent2 Allowed, but not required Allowed, but not required No
IDebugThreadCreateEvent2 Required Required No
IDebugThreadDestroyEvent2 Required Required No
IDebugThreadNameChangedEvent2 Allowed, but not required Allowed, but not required No

See Also

Sending Events