473,804 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where to set the CPP file search path in Visual Studio

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?
Jun 27 '08 #1
3 2983
Ed wrote:
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.

--
David Wilkinson
Visual C++ MVP
Jun 27 '08 #2
Ed wrote:
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
Jun 27 '08 #3
Ed
On May 5, 9:57 pm, "Carl Daniel [VC++ MVP]"
<cpdaniel_remov e_this_and_nos. ..@mvps.org.nos pamwrote:
Ed wrote:
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"

Thank you, all !

Ed.
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5830
by: Anders Eriksson | last post by:
Hello! I'm using VC++ 7.1 and MFC. In a header file that is located in a different directory that the main project I include a header file that is located in the main project directory. The project is called SCLaser. When I right-click on the #include "SCLaserDoc.h" and select Open Document SCLaserDoc.h, it can't find the file and lists all the directories that I
3
2036
by: Old Codger | last post by:
Thanks for this Oleg, nice try! Unfortunately the solution you gave refers to .NET 2002 and I am using .NET 2003. In the article it says: "This bug was corrected in Microsoft Visual C++ .NET (2003), and all versions of Microsoft Visual Studio .NET (2003). " Also, the "SourceFiles" directory DOES exist for VC7.1 and it appears to contain the correct path.
2
1766
by: Andrew Jocelyn | last post by:
Hi I get this error when I change something in the web.config file. When I build the VS projects and load the first web page the application runs fine. If I then make a save the web.config file I then get this error when I refresh the browser. I have to restart IIS to fix the problem. I've included the error info but it all looks very cryptic to me. How do I find out what's really happening and how to fix it? Thanks
6
2813
by: BookerW | last post by:
Ok interesting, on my local machine And i did not do a good job of keeping track of the exact order.... but on my local machine in which i have vis studio 2003 installed and IIS for win XP, I copied the web.config file from the source code folder into the inetpub\wwwroot folder b/c that is where the ASP engine was looking for it.
3
19816
by: Lou | last post by:
Question: I can't seem to get file.exists(filename) to return true when I search using wildcards, and I know there's a file in that dir with that extension. here's the path dim yesno as boolean FileName = "D:\Documents and Settings\Lou\My Documents\Visual Studio Projects\Lucky7\Lucky7\bin\*.txt"
4
2103
by: Axter | last post by:
Sorry for OT question, but does any one have a working *.bat file to get Comeau to work with VC++ 7.1, VC++ 8.0, or GNU 3.x compilers. I've tried everything I can think off, to get it to work, and I get compile errors. I'm currently using the following *.bat file http://axter.com/complr.bat With the following simple hello world source code: http://axter.com/helloworld.cpp
7
8155
by: Nathan Sokalski | last post by:
I am an ASP.NET developer, and Visual Studio 2005 seems to have stopped declaring the controls that I add in the *.designer.vb files, therefore forcing me to manually add them before I can use them in code that I write in the *.aspx.vb and *.ascx.vb files. Why is it no longer automatically declaring the controls? Is there a way to manually force Visual Studio 2005 to regenerate these files? Is there a setting somewhere that could have...
0
2642
by: =?Utf-8?B?TWFyY2VlcG9v?= | last post by:
I'm a newbie using Visual Studio and Vb.Net. The vbscript below opens a Windows Explorer Search Window. The Windows Explorer Search Window has fields in which the user can insert: (i) a search String Filter, and (ii) a search path String. 1. I can't figure out how to convert the vbscript so that it runs as a Visual Basic standalone .exe file. I'd appreciate any help re what code to use, and re which references are needed. 2. I'd like...
20
2409
by: David Thielen | last post by:
Hi; When we add a reference to a web app, where is that information stored? There is no project file, it's not in the web.config or solution file. ??? - thanks - dave david@at-at-at@windward.dot.dot.net Windward Reports -- http://www.WindwardReports.com
0
9714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10599
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10090
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7635
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6863
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5531
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3832
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.