IDebugExceptionEvent2

The debug engine (DE) sends this interface to the session debug manager (SDM) when an exception is thrown in the program currently being executed.

IDebugExceptionEvent2 : IUnknown

Notes for Implementers

The DE implements this interface to report that an exception has occurred in the program being debugged. The IDebugEvent2 interface must be implemented on the same object as this interface. The SDM uses QueryInterface to access the IDebugEvent2 interface.

Notes for Callers

The DE creates and sends this event object to report an exception. The event is sent using the IDebugEventCallback2 callback function that is supplied by the SDM when it attached to the program being debugged.

Methods in Vtable Order

The following table shows the methods of IDebugExceptionEvent2.

Method

Description

IDebugExceptionEvent2::GetException

Gets detailed information about the exception that fired this event.

IDebugExceptionEvent2::GetExceptionDescription

Gets a human-readable description for the exception thrown that fired this event.

IDebugExceptionEvent2::CanPassToDebuggee

Determines whether or not the debug engine (DE) supports the option of passing this exception to the program being debugged when execution resumes.

IDebugExceptionEvent2::PassToDebuggee

Specifies whether the exception should be passed on to the program being debugged when execution resumes, or if the exception should be discarded.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

Remarks

Before sending the event, the DE checks to see if this exception event has been designated a first-chance or second-chance exception by a previous call to IDebugEngine2::SetException. If it has been designated to be a first-chance exception, the IDebugExceptionEvent2 event is sent to the SDM. If not, the DE gives the application a chance to handle the exception. If no exception handler is provided, and if the exception has been designated as a second-chance exception, the IDebugExceptionEvent2 event is sent to the SDM. Otherwise, the DE resumes execution of the program, and the operating system or runtime handles the exception.

See Also

Reference

IDebugEngine2::SetException

IDebugEvent2

IDebugEventCallback2

Concepts

Core Interfaces