Edit

Share via


IDebugProgram3::ExecuteOnThread

Executes the debugger program. The thread is returned to give the debugger information on which thread the user is viewing when executing the program.

Syntax

int ExecuteOnThread(
   IDebugThread2 pThread
);

Parameters

pThread
[in] An IDebugThread2 object.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

There are three different ways that a debugger can resume execution after stopping:

  • Execute: Cancel any previous step, and run until the next breakpoint and so on.

  • Step: Cancel any old step, and run until the new step completes.

  • Continue: Run again, and leave any old step active.

    The thread passed to ExecuteOnThread is useful when deciding which step to cancel. If you do not know the thread, running execute cancels all steps. With knowledge of the thread, you only need to cancel the step on the active thread.

See also