Launch 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. For more information, see Launch a program.
The SDM calls 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
returns, the debug engine (DE) is to be loaded in process of the virtual machine.-or-
If
S_OK
returns, the DE is to be loaded in-process of the SDM. The SDM then performs the following tasks:Calls GetEngineInfo to get the engine information of the DE.
Co-creates the DE.
Calls 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.