This topic has not yet been rated - Rate this topic

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)
int AdviseDebugEventCallback(
	Object punkDebuggerEvents
)

Parameters

punkDebuggerEvents
Type: System.Object
[in] Pointer to the IUnknown interface of an object that also implements IVsDebuggerEvents.

Return Value

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

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
);
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ