Where to set the CPP file search path in Visual Studio

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

Hi, dear all,
Sometimes, when I debug my program, VS seems very smart to find the
cpp file even if the file was not in the working directory. I am
wondering how did VS try to find the cpp file when we debug program.
Even walking through every menu items, I can not find the related
information.

What's the rules of it? Or, can we set the search path of it?
 
Ed said:
Hi, dear all,
Sometimes, when I debug my program, VS seems very smart to find the
cpp file even if the file was not in the working directory. I am
wondering how did VS try to find the cpp file when we debug program.
Even walking through every menu items, I can not find the related
information.

What's the rules of it? Or, can we set the search path of it?

Ed:

The location of every file in your project is recorded in the .vcproj file.
 
Ed said:
Hi, dear all,
Sometimes, when I debug my program, VS seems very smart to find the
cpp file even if the file was not in the working directory. I am
wondering how did VS try to find the cpp file when we debug program.
Even walking through every menu items, I can not find the related
information.

What's the rules of it? Or, can we set the search path of it?

The full path to each source file is stored in the PDB file, and that's the
first place the debugger looks for source files. As long as the source
files are accessible using the same paths that the compiler used, the
debugger will be able to find them. Beyond that, you can set up a "source
server" to enable the debugger to pull source files from a central location
if they're not going to be accessible using the build-time paths.

-cd
 
The full path to each source file is stored in the PDB file, and that's the
first place the debugger looks for source files. As long as the source
files are accessible using the same paths that the compiler used, the
debugger will be able to find them. Beyond that, you can set up a "source
server" to enable the debugger to pull source files from a central location
if they're not going to be accessible using the build-time paths.

-cd

"The full path to each source file is stored in the PDB file"

Thank you, all !

Ed.
 
Back
Top