Original Post
🔒 Locked
msvc debugger
Advertisement
When you run the program from the IDE, the working directly is set to your project directory, which is usually the folder containing the debug and release folders. When you run the program from explorer, the working directory is set to the current directory.
You can change the working directory in the IDE by going to project settings -> Debugging and changing the "Working Directory" there.
Alternatively, load all your resources using absolute paths instead of relative paths (E.g. "C:\folder\app\data\blah.txt" instead of "data\blah.txt"). You can use GetModuleFileName() to get the filename of your exe, and strip the filename to get the path to your exe.
You can change the working directory in the IDE by going to project settings -> Debugging and changing the "Working Directory" there.
Alternatively, load all your resources using absolute paths instead of relative paths (E.g. "C:\folder\app\data\blah.txt" instead of "data\blah.txt"). You can use GetModuleFileName() to get the filename of your exe, and strip the filename to get the path to your exe.
Quote:Just to nitpick: The compiler in debug mode sets the default values, not the IDE. The default values are supposed to be gibberish (At least, a recognisable pattern), so you can notice uninitialized variables. If he runs the debug exe from explorer, the variables will be initialized the same.
Original post by kuphryn
ide provides default values and exception handlers
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement