I am debugging an executable which tries to load a file using
ifstream is("filename");
This fails because in the 'current folder' this file seems to be missing. I am pretty sure the file is in the folder containing the project and solution and the working directory is set to project-dir.
Question: is there a way to show the folder where ifstream will look for the file in the debugger?
Edit 1: Getting information about the current project dir can be done like this:
How can I find out the value of $(ProjectDir)?
Edit 2: The current working dir can be obtained like this:
char * dir = _getcwd(NULL, 0);
I have not found a way to get this information in the debugger without recompiling which would be much nicer.
Process Explorer is a tool available from microsoft.com
It will show the active directory of all running processes.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With