Re: setting unix environment variables for debugging
Re: setting unix environment variables for debugging
- Subject: Re: setting unix environment variables for debugging
- From: Greg Guerin <email@hidden>
- Date: Thu, 7 Feb 2008 17:45:07 -0700
Joe Harris wrote (apparently off-list):
>Even a simple one like home; in the code I use it as
>'$HOME/some/more/path/' and it still is not recognized. Any thoughts?
Try not quoting it. For example:
1. Add a Custom Executable in Xcode.
2. Give it an executable of /usr/bin/printenv
3. For Arguments, give it no arguments.
4. For "Variables to be set in environment" add an entry with:
SpongeBob as the name, and
$HOME/pineapple under the sea as the value
5. Run the executable.
6. In the output, find "SpongeBob".
7. Observe that $HOME has been expanded.
If you meant something else, then please explain exactly what you mean,
perhaps by posting the source code fragment you're using, and the exact
value of one of the env-vars that's not working.
And from the original post:
>A related question is how do I verify the env var are set correctly before
>debugging?
Add code to your program that prints out the values of the env-vars you're
interested in. Then you can manually confirm the values it's getting.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden