Share via


IVsDebugger.AdviseDebugEventCallback Method

Used by a client to receive notifications of debugger events. In general, use AdviseDebuggerEvents and UnadviseDebuggerEvents instead.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function AdviseDebugEventCallback ( _
    punkDebuggerEvents As Object _
) As Integer
int AdviseDebugEventCallback(
    Object punkDebuggerEvents
)
int AdviseDebugEventCallback(
    [InAttribute] Object^ punkDebuggerEvents
)
abstract AdviseDebugEventCallback : 
        punkDebuggerEvents:Object -> int
function AdviseDebugEventCallback(
    punkDebuggerEvents : Object
) : int

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method allows a Visual Studio package to receive all debug events. This can be useful for establishing a custom communication channel between a package and a debug engine. This API should be used with care since it forwards all debug events.

The punkDebuggerEvents object needs to also implement IDebugEventCallback. It is strongly advised that if a package chooses to implement IDebugEventCallback in managed code, that ReleaseComObject be invoked on the various interfaces passed to IDebugEventCallback2::Event.

COM Signature

From vsshell.idl:

HRESULT IVsDebugger::AdviseDebugEventCallback(
   [in]IUnknown *punkDebuggerEvents
);

.NET Framework Security

See Also

Reference

IVsDebugger Interface

Microsoft.VisualStudio.Shell.Interop Namespace