Udostępnij za pośrednictwem


Launching the Debugger

Launching the debugger requires sending the correct sequence of methods and events with their proper attributes.

Sequences of Methods and Events

  1. The session debug manager (SDM) is called by choosing the Debug menu, and then choosing Start. See Launching a Program for more information.

  2. The SDM calls IDebugProgramNodeAttach2::OnAttach method .

  3. 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:

    1. Calls IDebugProgramNode2::GetEngineInfo to get the engine information of the DE.

    2. Co-creates the DE.

    3. Calls IDebugEngine2::Attach.

  4. The DE sends an IDebugEngineCreateEvent2 to the SDM with an EVENT_SYNC attribute.

  5. The DE sends an IDebugProgramCreateEvent2 to the SDM with an EVENT_SYNC attribute.

  6. The DE sends an IDebugThreadCreateEvent2 to the SDM with an EVENT_SYNC attribute.

  7. The DE sends an IDebugLoadCompleteEvent2 to the SDM with an EVENT_SYNC attribute.

  8. The DE sends an IDebugEntryPointEvent2 to the SDM with an EVENT_SYNC attribute.

See Also

Concepts

Calling Debugger Events

Launching a Program