Debugging with VisualStudio

Apr 11, 2011 at 1:55pm
Hi there.

I've got a question about debugging with MS VisualStudio. I've got a .cpp-file with a ifstream-command which reads from the file "input.txt".
I put the txt in the same folder where i found the .exe after building the project and if I doubleclick the .exe it works, but if I use the debugging with VS it can't find the input.txt. Where do I have to put it then?

Thanks for helping, ElCattivo
Apr 11, 2011 at 1:56pm
Im guessing with the debug version of the exe as opposed to the release folder version, look for a folder named "Debug" in the project and put the file in there.
Apr 11, 2011 at 2:30pm
No, I tried, but that doesn't help.
With debugging I don't mean the Debug configuration, I mean clicking on the small green triangle (or pressing F5) with Release configuration.
Apr 11, 2011 at 4:50pm
Place the text file to your project directory. It is where the .vcproj file is located.

Hope that helps, Good luck!!
Apr 11, 2011 at 10:25pm
I believe in the Debug folder. That's where I put files that I want to read without supplying a full path.
Apr 12, 2011 at 6:17am
Well when you debug a program it uses whichever configuration you have it set to, i.e. release or debug.
If you set the program to debug configuration in project properties and then paste the file in the debug folder next to the program it should work
Topic archived. No new replies allowed.