Skip to content

Commit a632c23

Browse files
Enhance sourecFileMap documentation (#4844)
The documentation for `sourceFileMap` was not very through. This tries to make things more clear.
1 parent 2322b78 commit a632c23

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

debugger-launchjson.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,17 @@ The `"console"` setting controls what console (terminal) window the target app i
136136
`"externalTerminal"`: the target process will run inside its own external terminal.
137137

138138
## Source File Map
139-
You can optionally configure a file by file mapping by providing map following this schema:
139+
You can optionally configure how source files are opened by providing a map using this form:
140140

141141
"sourceFileMap": {
142142
"C:\\foo":"/home/me/foo"
143143
}
144144

145+
In this example:
146+
* `C:\foo` is the original location for one or more source files (example: `program.cs`) when a module (example: MyCode.dll) was compiled. It can either be a directory that has source files under it, or a complete path to a source file (example: `c:\foo\program.cs`). It doesn't need to exist either on the computer running Visual Studio Code, or if you are remote debugging, on the remote machine. The debugger will read the path to the source file from the .pdb (symbol) file, and it will transform it using this map.
147+
* `/home/me/foo` is the path where the source file can now be found by Visual Studio Code.
148+
149+
145150
## Just My Code
146151
You can optionally disable `justMyCode` by setting it to "false". You should disable Just My Code when you are trying to debug into a library that you pulled down which doesn't have symbols or is optimized.
147152

0 commit comments

Comments
 (0)