We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
3123/24, 8:37 AM Souree Code Path - Windows drivers | Microsoft Lear
Source Code Path
Article + 12/15/2021
The source path specifies the directories where the C and C++ source files are located.
If you are debugging a user-mode process on the computer where the executable file was
built, and if the source files are still in their original location, the debugger can
automatically locate the source files.
In most other situations, you have to set the source path or load the individual source files.
When you are performing remote debugging through the debugger, the debugging server
uses the source path. If you are using WinDbg as your debugger, each debugging client
also has its own local source path, All source-related commands access the source files on
the local computer. You have to set the proper paths on any client or server that you want
to use source commands.
This multiple-path system also enables a debugging client to use source-related
commands without actually sharing the source files with other clients or with the server.
This system is useful if there are private or confidential source files that one of the users
has access to.
You can also load source files at any time, regardless of the source path
Source Path Syntax
The debugger's source path is a string that consists of multiple directory paths, separated
by semicolons
Relative paths are supported. However, unless you always start the debugger from the
same directory, you should add a drive letter or a network share before each path. Network
shares are also supported.
Note If you are connected to a corporate network, the most efficient way to access source
files is to use a source server. You can use a source server by using the srv\* string within
your source path. For more information about source servers, see Using a Source Server.
Controlling the Source Path
nitps:leam microsoft comlan-usiwindows-hardwareldrversidebugger/source-path3123/24, 8:37 AM Souree Code Path - Windows drivers | Microsoft Lear
To control the source path and local source path, you can do one of the following:
* Before you start the debugger, use the NT_SOURCE_PATH environment variable to
set the source path. If you try to add an invalid directory through this environment
variable, the debugger ignores this directory.
‘* When you start the debugger, use the -srcpathcommand-line option to set the
source path
‘* Use the .srcpath (Set Source Path) command to display, set, change, or append to the
source path. If you are using a source server, .srcfix (Use Source Server) is slightly
easier.
‘* (WinDbg only) Use the .Isrcpath (Set Local Source Path) command to display, set,
change, or append to the local source path. If you are using a source server, .Isrcfix
(Use Local Source Server) is slightly easier. You can also use the WinDbg Command-
Line with the parameter -Iscrpath, For more information, see WinDbg Command-Line
Options.
‘* (WinDbg only) Use the [File | Source File Path command or press CTRL+P to display,
set, change, or append to the source path or the local source path.
You can also directly open or close a source file by doing one of the following
* Use the Isf (Load or Unload Source File) command to open or close a source file
* (WinDbg only) Use the .open (Open Source File) command to open a source file.
‘* (WinDbg only) Use the file | open source file command or press ctrl+o to open a
source file. you can also use the open source file (ctrl+0) button on the toolbar.
Note When you use File | Open Source File (or its shortcut menu or button
equivalents) to open a source file, the path of that file is automatically appended to
the source path
‘* (WinDbg only) Use the File | Recent Files command to open one of the four source
files that you most recently opened in WinDbg
‘* (WinDbg only) Use the File | Close Current Window command or select the Close
button in the corner of the Source window to close a source file.
See also
nitps:leam microsoft comlan-usiwindows-hardwareldrversidebugger/source-path 203723/24, 8:37 AM Souree Code Path - Windows drivers | Microsoft Lear
For more information about how to use source files, see Debugging in Source Mode.
Feedback
Was this page helpful?
Provide product feedback | Get help at Microsoft Q&A
hips: lear microsoft comver-usiwindows hardwareidrversidebuggerisource-path a