Cannot debug on Mac
by Anthony Lovell · in Torque Game Engine · 09/28/2005 (2:15 pm) · 7 replies
I do not understand how much more difficult this could be.
The issue that xcode 2.1 insists on putting the apps in the wrong place is not a huge problem. But Xcode's debugger apparently ignores attempts to specify where the working directory should be at debug time.
I do Project->edit active executable...->set working directory to: blahblahblah/example and yet it does not find the main.cs
What is the secret?
tone
The issue that xcode 2.1 insists on putting the apps in the wrong place is not a huge problem. But Xcode's debugger apparently ignores attempts to specify where the working directory should be at debug time.
I do Project->edit active executable...->set working directory to: blahblahblah/example and yet it does not find the main.cs
What is the secret?
tone
#2
09/29/2005 (6:13 am)
If I recall, when you do a fresh dowload of CVS, the "fix xcode2.1 build folders.command" isn't executable, so you'll need to chmod it.
#3
Paul... I appreciate your help, but reading the readme and applying its tweak (which in and of itself makes no mention of the fix script) is what got me to this stage.
I had not noticed there was a script (because it is not mentioned in the readme.txt file though I see some discussion of its function in another thread). Now that I have run it, I still find that I'm exactly where I was.
to sum up, on xcode 2.1:
1. I did a "clean all"
2. I have run the "fix" script (from a CWD of the pb folder, as no explicit folder was mentioned).
3. In my project properties, I have "place build products in a custom location" -- "../example" (no quotes, natch)
4. I did a "build all" -- the .app is placed in example/Development
5. In project->edit active executable, I "set working directory to" my example directory.
6. When I attempt to run it under the debugger, it fails to find main.cs (despite #5 setting)
7. If I manually move the .app from example/Development to example, xcode does not find it when I attempt to start the debugger
I believe I have applied all the settings requested
Any idea what is wrong?
tone
10/03/2005 (9:12 am)
Quote:
Read the readme.txt file. See the very large banner about getting it to debug properly.
Paul... I appreciate your help, but reading the readme and applying its tweak (which in and of itself makes no mention of the fix script) is what got me to this stage.
I had not noticed there was a script (because it is not mentioned in the readme.txt file though I see some discussion of its function in another thread). Now that I have run it, I still find that I'm exactly where I was.
to sum up, on xcode 2.1:
1. I did a "clean all"
2. I have run the "fix" script (from a CWD of the pb folder, as no explicit folder was mentioned).
3. In my project properties, I have "place build products in a custom location" -- "../example" (no quotes, natch)
4. I did a "build all" -- the .app is placed in example/Development
5. In project->edit active executable, I "set working directory to" my example directory.
6. When I attempt to run it under the debugger, it fails to find main.cs (despite #5 setting)
7. If I manually move the .app from example/Development to example, xcode does not find it when I attempt to start the debugger
I believe I have applied all the settings requested
Any idea what is wrong?
tone
#4
Let me pick through again and see what changes. I'm sure this will account for the divergent views on just how this is working!
tone
10/03/2005 (9:32 am)
I just checked out the latest HEAD and see significant differences from what I had (I had checked out on 9/13/2005).Let me pick through again and see what changes. I'm sure this will account for the divergent views on just how this is working!
tone
#5
Once the kinks are worked out in both the Mac changes, as well as 1.4 as a whole, the installers will be updated.
10/03/2005 (10:31 am)
Just as an FYI, Paul has been doing a MAJOR (yes, that's bold caps!) re-write of all things Mac, and it currently exists in the 1.4 RC2 CVS repository. Anything basically that he mentions is going to be related to this code version, not the installer you download from your account.Once the kinks are worked out in both the Mac changes, as well as 1.4 as a whole, the installers will be updated.
#6
In Xcode 2.1, because it adds that extra folder, the best solution is to trick it into putting things in the right place, instead of trying to specify the right place inside Xcode.
Xcode will want to place the built app in the pb/build/NameOfActiveBuildConfiguration/ folder. It will also look there when it tries to start the debugger. It always adds a folder with the name of the active build configuration to the built products path. There is no way to alter this behavior, that I've been able to find, so the thing to do is work around it. The 'fix..' script makes some symbolic links inside the build folder, to allow Xcode to put the app where it wants to, and still get it into the .../example directory where it belongs.
So, Steps 3, 5, 7 are unneccessary if you're using the 'fix...' script. Just use Xcode's default values, dont change them, if using Xcode2.1.
If you're using any version before Xcode2.1, you must set the build products paths to ../example manually.
Hope that helps,
10/03/2005 (5:43 pm)
@Anthony: You've probably seen the updated pb/readme.txt by now, but just to explain why the steps you gave above didn't give you the result you wanted:In Xcode 2.1, because it adds that extra folder, the best solution is to trick it into putting things in the right place, instead of trying to specify the right place inside Xcode.
Xcode will want to place the built app in the pb/build/NameOfActiveBuildConfiguration/ folder. It will also look there when it tries to start the debugger. It always adds a folder with the name of the active build configuration to the built products path. There is no way to alter this behavior, that I've been able to find, so the thing to do is work around it. The 'fix..' script makes some symbolic links inside the build folder, to allow Xcode to put the app where it wants to, and still get it into the .../example directory where it belongs.
So, Steps 3, 5, 7 are unneccessary if you're using the 'fix...' script. Just use Xcode's default values, dont change them, if using Xcode2.1.
If you're using any version before Xcode2.1, you must set the build products paths to ../example manually.
Hope that helps,
#7
I have now refreshed my Windows machine to 1.4rc2 and have it again building and running. I will blit the mess over to the Mac next week and have renewed confidence that this will work. I'll sure review these posts here as well before asking for help again.
tone
10/08/2005 (11:49 am)
I did get the code from CVS, but apparently a single day before the Mac 1.4rc2 stuff went up. So it was a race condition (and I never win races).I have now refreshed my Windows machine to 1.4rc2 and have it again building and running. I will blit the mess over to the Mac next week and have renewed confidence that this will work. I'll sure review these posts here as well before asking for help again.
tone
Torque Owner Paul Scott
Default Studio Name
Read the readme.txt file. See the very large banner about getting it to debug properly.
Basically, Xcode2.1 *insists* on adding an additional suffix to the build product destination path. It adds the name of the current build configuration. There is a double-clickable script included, called "fix xcode2.1 build folders.command" . Try running it, then try doing a build-and-debug.
I really really meant it when I said 'read the readme'.