Debugging Tools for Windows

SetCommand

The SetCommand and SetCommandWide methods set the command that is executed when a breakpoint is triggered.

HRESULT
  IDebugBreakpoint::SetCommand(
    IN PCSTR  Command
    );

HRESULT
  IDebugBreakpoint2::SetCommandWide(
    IN PCSTR  Command
    );

#ifdef UNICODE
#define SetCommandT SetCommandWide
#else
#define SetCommandT SetCommand
#endif

Parameters

Command
The command string that is executed when the breakpoint is triggered.

Return Value

SetCommand and SetCommandWide might return one of the following values:

S_OK
The method was successful.

This method might also return error values. For more information about possible return values, see Return Values.

Comments

The command string is a list of debugger commands that are separated by semicolons. These commands are executed every time that the breakpoint is triggered. The commands are executed before the engine informs any event callbacks that the breakpoint has been triggered.

If the command string includes an execution command such as G (Go), this command should be the last command in the Command string. If a command causes the target to resume execution, the rest of the command string is ignored.

For more information about breakpoint properties, see Controlling Breakpoint Flags and Parameters.

Requirements

Versions: SetCommand is available in all versions of IDebugBreakpoint. SetCommandWide is available in IDebugBreakpoint2 and later versions.

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

Build machine: CAPEBUILD