/SOURCELINK (Include Source Link file in PDB)
Specifies a Source Link configuration file to include in the PDB file generated by the linker.
Syntax
/SOURCELINK:
filename
Arguments
filename
Specifies a JSON-formatted configuration file that contains a simple mapping of local file paths to URLs for source files to display in the debugger. For more information on the format of this file, see Source Link JSON Schema.
Remarks
Source Link is a language- and source-control agnostic system for providing source debugging for binaries. Source Link is supported for native C++ binaries starting in Visual Studio 2017 version 15.8. For an overview of Source Link, see Source Link. For information on how to use Source Link in your projects, and how to generate the SourceLink file as part of your project, see Using Source Link.
To set the /SOURCELINK linker option in Visual Studio
Open the Property Pages dialog box for the project. For more information, see Set C++ compiler and build properties in Visual Studio.
Select the Configuration Properties > Linker > Command Line property page.
In the Additional options box, add
/SOURCELINK:
filename
and then choose OK or Apply to save your changes.
To set this linker option programmatically
- This option doesn't have a programmatic equivalent.