IDebugStackFrame3
This interface extends IDebugStackFrame2 to handle intercepted exceptions.
IDebugStackFrame3 : IDebugStackFrame2
Notes for Implementers
The debug engine (DE) implements this interface on the same object that implements the IDebugStackFrame2 interface to support intercepted exceptions.
Notes for Callers
Call QueryInterface on an IDebugStackFrame2 interface to obtain this interface.
Methods in Vtable Order
In addition to the methods inherited from IDebugStackFrame2, IDebugStackFrame3 exposes the following methods.
Method |
Description |
---|---|
Handles an exception for the current stack frame before any regular exception handling. |
|
Returns a code context if a stack unwind were to occur. |
Remarks
An intercepted exception means that a debugger can process an exception before any normal exception handling routines are called by the run time. Intercepting an exception essentially means making the run time pretend that there is an exception handler present even when there is not.
IDebugStackFrame3::InterceptCurrentException is called during all normal exception callback events (the only exception to this is if you are debugging mixed-mode code (managed and unmanaged code), in which case the exception cannot be intercepted during the last-chance callback). If the DE does not implement IDebugStackFrame3, or the DE returns an error from IDebugStackFrame3::InterceptCurrentException (such as E_NOTIMPL), then the debugger will handle the exception normally.
By intercepting an exception, the debugger can allow the user to make changes to the state of the program being debugged and then resume execution at the point where the exception was thrown.
참고
Intercepted exceptions are allowed only in managed code, that is, in a program that is running under the Common Language Runtime (CLR).
A debug engine indicates that it supports intercepting exceptions by setting "metricExceptions" to a value of 1 at run time by using the SetMetric function. For more information, see SDK Helpers for Debugging.
Requirements
Header: msdbg.h
Namespace: Microsoft.VisualStudio.Debugger.Interop
Assembly: Microsoft.VisualStudio.Debugger.Interop.dll