Freigeben über


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

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

Concepts

Sending Events