Launching the Debugger
Launching the debugger requires sending the correct sequence of methods and events with their proper attributes.
Sequences of Methods and Events
The session debug manager (SDM) is called by choosing the Debug menu, and then choosing Start. See Launching a Program for more information.
The SDM calls IDebugProgramNodeAttach2::OnAttach method .
Based on the debug engine (DE) process model, the IDebugProgramNodeAttach2::OnAttach method returns one of the following methods, which determines what happens next.
If S_FALSE is returned, the debug engine (DE) is to be loaded in process of the virtual machine.
-or-
If S_OK is returned, the DE is to be loaded in-process of the SDM. The SDM then performs the following tasks:
Calls IDebugProgramNode2::GetEngineInfo to get the engine information of the DE.
Co-creates the DE.
Calls IDebugEngine2::Attach.
The DE sends an IDebugEngineCreateEvent2 to the SDM with an EVENT_SYNC attribute.
The DE sends an IDebugProgramCreateEvent2 to the SDM with an EVENT_SYNC attribute.
The DE sends an IDebugThreadCreateEvent2 to the SDM with an EVENT_SYNC attribute.
The DE sends an IDebugLoadCompleteEvent2 to the SDM with an EVENT_SYNC attribute.
The DE sends an IDebugEntryPointEvent2 to the SDM with an EVENT_SYNC attribute.