VS debug mode: script sourcing
by Hahn Bak · in Technical Issues · 07/11/2007 (9:27 pm) · 4 replies
I have my VS output file set to C:\Game for both debug and release modes.
Release works fine, it reads C:\Game\main.cs which points to C:\Game\starter.fps, C:\Game\common, etc.
However, when i run in debug mode, it attempts to read C:\Game\vc7\main.cs... even though it generates C:\Game\torqueDemo_DEBUG.exe
I figured that it would try to read paths from script files relative to the .exe for debug mode, but it's looking relative to the VS project folder. Is there anything I can do to make debug mode read script files relative to the debug .exe?
Thanks much
Release works fine, it reads C:\Game\main.cs which points to C:\Game\starter.fps, C:\Game\common, etc.
However, when i run in debug mode, it attempts to read C:\Game\vc7\main.cs... even though it generates C:\Game\torqueDemo_DEBUG.exe
I figured that it would try to read paths from script files relative to the .exe for debug mode, but it's looking relative to the VS project folder. Is there anything I can do to make debug mode read script files relative to the debug .exe?
Thanks much
#2
By default Microsoft Visual Studio makes the Working Directory the same as the solution file and Torque assumes that the Working Directory is the same directory as the scripts which is why you are seeing the the behavior you described.
To fix Change the Working Directory by:
(Note this is for Microsoft Visual Studio Express - Similar method for other compiler versions.)
Set Working Directory for Debug by:
- Load your project
- Ensure that the "Torque Demo" is selected in the Solution Explorer window.
- Select Properties by:
Pressing Alt-F7
or:
Select Project->Properties
This will bring up the Property Pages
- Ensure Configuration is either "Debug" or "All Configurations"
Debug - Will just perform the debug configuration.
- Ensure "Configuration Properties" Tree is expanded
- Select the "Debugging" Node
- Set the "Working Directory" to c:\game\
Hope that helps,
07/30/2007 (11:06 am)
In the future you should post questions regarding the SDK in the private SDK forums. You are far more likely to get those who work with the SDK to see your post and respond. You are correct though that it is a complier "issue".By default Microsoft Visual Studio makes the Working Directory the same as the solution file and Torque assumes that the Working Directory is the same directory as the scripts which is why you are seeing the the behavior you described.
To fix Change the Working Directory by:
(Note this is for Microsoft Visual Studio Express - Similar method for other compiler versions.)
Set Working Directory for Debug by:
- Load your project
- Ensure that the "Torque Demo" is selected in the Solution Explorer window.
- Select Properties by:
Pressing Alt-F7
or:
Select Project->Properties
This will bring up the Property Pages
- Ensure Configuration is either "Debug" or "All Configurations"
Debug - Will just perform the debug configuration.
- Ensure "Configuration Properties" Tree is expanded
- Select the "Debugging" Node
- Set the "Working Directory" to c:\game\
Hope that helps,
#3
08/02/2007 (5:43 pm)
Wow, thanks. you solved my problem AND made me realize there are private sdk forums. sick.
#4
08/02/2007 (8:43 pm)
Glad I could help. :-)
Torque Owner Hahn Bak