Where to set the CPP file search path in Visual Studio

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?
 
D

David Wilkinson

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

Carl Daniel [VC++ MVP]

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
 
E

Ed

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top