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


Starting with version x.y.z, released in April 2021, additional source code formats are supported including source link 1 and source link 2, using the DebugInfoD path element. For more information, see Source Code Extended Access.


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.