ICorDebugManagedCallback Interface

Provides methods to process debugger callbacks.

interface ICorDebugManagedCallback : IUnknown {
    HRESULT _stdcall Break(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* thread);
    HRESULT _stdcall Breakpoint(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* pThread, 
                    [in] ICorDebugBreakpoint* pBreakpoint);
    HRESULT _stdcall BreakpointSetError(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* pThread, 
                    [in] ICorDebugBreakpoint* pBreakpoint, 
                    [in] unsigned long dwError);
    HRESULT _stdcall ControlCTrap([in] ICorDebugProcess* pProcess);
    HRESULT _stdcall CreateAppDomain(
                    [in] ICorDebugProcess* pProcess, 
                    [in] ICorDebugAppDomain* pAppDomain);
    HRESULT _stdcall CreateProcess([in] ICorDebugProcess* pProcess);
    HRESULT _stdcall CreateThread(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* thread);
    HRESULT _stdcall DebuggerError(
                    [in] ICorDebugProcess* pProcess, 
                    [in] HRESULT errorHR, 
                    [in] unsigned long errorCode);
    HRESULT _stdcall EditAndContinueRemap(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* pThread, 
                    [in] ICorDebugFunction* pFunction, 
                    [in] long fAccurate);
    HRESULT _stdcall EvalComplete(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* pThread, 
                    [in] ICorDebugEval* pEval);
    HRESULT _stdcall EvalException(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* pThread, 
                    [in] ICorDebugEval* pEval);
    HRESULT _stdcall Exception(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* pThread, 
                    [in] long unhandled);
    HRESULT _stdcall ExitAppDomain(
                    [in] ICorDebugProcess* pProcess, 
                    [in] ICorDebugAppDomain* pAppDomain);
    HRESULT _stdcall ExitProcess([in] ICorDebugProcess* pProcess);
    HRESULT _stdcall ExitThread(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* thread);
    HRESULT _stdcall LoadAssembly(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugAssembly* pAssembly);
    HRESULT _stdcall LoadClass(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugClass* c);
    HRESULT _stdcall LoadModule(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugModule* pModule);
    HRESULT _stdcall LogMessage(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* pThread, 
                    [in] long lLevel, 
                    [in] unsigned short* pLogSwitchName, 
                    [in] unsigned short* pMessage);
    HRESULT _stdcall LogSwitch(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* pThread, 
                    [in] long lLevel, 
                    [in] unsigned long ulReason, 
                    [in] unsigned short* pLogSwitchName, 
                    [in] unsigned short* pParentName);
    HRESULT _stdcall NameChange(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* pThread);
    HRESULT _stdcall StepComplete(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugThread* pThread, 
                    [in] ICorDebugStepper* pStepper, 
                    [in] CorDebugStepReason reason);
    HRESULT _stdcall UnloadAssembly(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugAssembly* pAssembly);
    HRESULT _stdcall UnloadClass(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugClass* c);
    HRESULT _stdcall UnloadModule(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugModule* pModule);
    HRESULT _stdcall UpdateModuleSymbols(
                    [in] ICorDebugAppDomain* pAppDomain, 
                    [in] ICorDebugModule* pModule, 
                    [in] IStream* pSymbolStream);
};

Methods

Method Description

ICorDebugManagedCallback::Break Method

Notifies the debugger when a Break instruction in the code stream is executed.

ICorDebugManagedCallback::Breakpoint Method

Notifies the debugger when a breakpoint is encountered.

ICorDebugManagedCallback::BreakpointSetError Method

Notifies the debugger that the common language runtime (CLR) was unable to accurately bind a breakpoint that was set before a function was just-in-time (JIT) compiled.

ICorDebugManagedCallback::ControlCTrap Method

Notifies the debugger that a CTRL+C is trapped in the process being debugged.

ICorDebugManagedCallback::CreateAppDomain Method

Notifies the debugger that an application domain has been created.

ICorDebugManagedCallback::CreateProcess Method

Notifies the debugger when a process has been attached or started for the first time.

ICorDebugManagedCallback::CreateThread Method

Notifies the debugger that a thread has started executing managed code.

ICorDebugManagedCallback::DebuggerError Method

Notifies the debugger that an error has occurred while attempting to handle an event from the CLR.

ICorDebugManagedCallback::EditAndContinueRemap Method

Deprecated. Notifies the debugger that a remap event has been sent to the IDE.

ICorDebugManagedCallback::EvalComplete Method

Notifies the debugger that an evaluation has been completed.

ICorDebugManagedCallback::EvalException Method

Notifies the debugger that an evaluation has been terminated with an unhandled exception.

ICorDebugManagedCallback::Exception Method

Notifies the debugger that an exception has been thrown from managed code.

ICorDebugManagedCallback::ExitAppDomain Method

Notifies the debugger that an application domain has exited.

ICorDebugManagedCallback::ExitProcess Method

Notifies the debugger that a process has exited.

ICorDebugManagedCallback::ExitThread Method

Notifies the debugger that a thread that was executing managed code has exited.

ICorDebugManagedCallback::LoadAssembly Method

Notifies the debugger that a CLR assembly has been successfully loaded.

ICorDebugManagedCallback::LoadClass Method

Notifies the debugger that a class has been loaded.

ICorDebugManagedCallback::LoadModule Method

Notifies the debugger that a CLR module has been successfully loaded.

ICorDebugManagedCallback::LogMessage Method

Notifies the debugger that a CLR managed thread has called a method in the EventLog class to log an event.

ICorDebugManagedCallback::LogSwitch Method

Notifies the debugger that a CLR managed thread has called a method in the Switch class to create, modify, or delete a debugging/tracing switch.

ICorDebugManagedCallback::NameChange Method

Notifies the debugger that the name of either an application domain or thread has changed.

ICorDebugManagedCallback::StepComplete Method

Notifies the debugger that a step has completed.

ICorDebugManagedCallback::UnloadAssembly Method

Notifies the debugger that a CLR assembly has been unloaded.

ICorDebugManagedCallback::UnloadClass Method

Notifies the debugger that a class is being unloaded.

ICorDebugManagedCallback::UnloadModule Method

Notifies the debugger that a CLR module (DLL) has been unloaded.

ICorDebugManagedCallback::UpdateModuleSymbols Method

Notifies the debugger that the symbols for a CLR module have changed.

Remarks

All callbacks are serialized, called in the same thread, and called with the process in the synchronized state.

Each callback implementation must call ICorDebugController::Continue Method to resume execution. If ICorDebugController::Continue is not called before the callback returns, the process will remain stopped and no more event callbacks will occur until ICorDebugController::Continue is called.

A debugger must implement ICorDebugManagedCallback2 Interface if it is debugging .NET Framework version 2.0 applications. An instance of ICorDebugManagedCallback or ICorDebugManagedCallback2 is passed as the callback object to ICorDebug::SetManagedHandler Method.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorDebug.idl

Library: CorGuids.lib

.NET Framework Version: 2.0, 1.1, 1.0

See Also

Reference

ICorDebug Interface
ICorDebugManagedCallback2 Interface

Other Resources

Debugging Interfaces