.srcpath, .lsrcpath (Set Source Path)

The .srcpath and .lsrcpath commands set or display the source file search path.

.srcpath[+] [Directory [; ...]] 
.lsrcpath[+] [Directory [; ...]] 


Specifies that the new directories will be appended to (rather than replacing) the previous source file search path.

Specifies one or more directories to put in the search path. If Directory is not specified, the current path is displayed. Separate multiple directories with semicolons.


The .srcpath command is available on all debuggers. The .lsrcpath command is available only in WinDbg and cannot be used in script files.


user mode, kernel mode


live, crash dump



Additional Information

For details and other ways to change this path, see Source Path. For more information about commands that can be used while performing remote debugging through the debugger, see Controlling a Remote Debugging Session.


If you include srv* in your source path, the debugger uses SrcSrv to retrieve source files from locations specified in the target modules' symbol files. For more information about using srv* in a source path, see Using a Source Server and .srcfix.

When this command is issued from a debugging client, .srcpath sets the source path on the debugging server, while .lsrcpath sets the source path on the local machine.