DbgSrv Command-Line Options

The DbgSrv command line uses the following syntax.

dbgsrv -t ServerTransport [-sifeo image.ext] -c[s] AppCmdLine [-x | -pc] 

dbgsrv -? 

All options are case-sensitive.

Parameters

-t ServerTransport
Specifies the transport protocol. For a list of the possible protocols and the syntax for ServerTransport in each case, see Activating a Process Server.

-sifeo Executable
Suspends the Image File Execution Option (IFEO) value for the given image. Executable should include the file name of the executable image, including the file name extensions. The -sifeo option allows DbgSrv to be set as the IFEO debugger for an image created by the -c option, without causing recursive invocation due to the IFEO setting. This option can be used only if -c is used.

-c
Causes DbgSrv to create a new process. You can use this to create a process that you intend to debug. This is similar to spawning a new process from the debugger, except that this process will not be debugged when it is created. To debug this process, determine its PID and use the -p option when starting the smart client to debug this process.

s
Causes the newly-created process to be immediately suspended. If you are using this option, it is recommended that you use CDB as your smart client, and that you start the smart client with the -pb command-line option, in conjunction with -p PID. If you include the -pb option on the command line, the process will resume when the debugger attaches to it; otherwise you can resume the process with the ~*m command.

AppCmdLine
Specifies the full command line of the process to be created. AppCmdLine can be either a Unicode or ASCII string, and can include any printable character. All text that appears after the -c[s] parameter will be taken to form the string AppCmdLine.

-x
Causes the remainder of the command line to be ignored. This option is useful if you are launching DbgSrv from an application that may append unwanted text to its command line.

-pc
Causes the remainder of the command line to be used as the "implicit command line" as a pending process creation. This command line will be used if a debugger is connected to this process server with the "-cimp". For instance, running dbgsrv -t <ServerTransport> -pc notepad.exe, and then running ntsd -premote <Transport> -cimp will cause ntsd to connect to dbgsrv and launch notepad.exe

-?
Displays a message box with help text for the DbgSrv command line.

For information about using DbgSrv, see Process Servers (User Mode).