gdb and variables tags are collections are tags?

gdb, Xcode and Chandler - a story

So last week I was trying to find a workflow by which it would be possible to o source-level debugging of Chandler, using Apple’s Xcode IDE.

Since Xcode uses gdb, I first looked at that environment. It didn’t take too long to get to the point where I was able to do a stack trace, list source code, etc. I thought this meant it wouldn’t be too bad to get this working in Xcode too.

However, now it seems like it will take more work than I had thought. Chandler is launched using the RunChandler script, which in turn uses the RunPython script. These both set up environment variables, which seem to be very important for Chandler to function correctly.

I tried re-implementing the scripts in the debugger by setting the values of environment variables appropriately.

2005-01-30-xcode-env.jpg
Setting all the environment variables correctly in order for Chandler to run is tricky.

Results vary from output like

Debugger stopped.
Program exited with status value:1.’import site’ failed; use -v for traceback
Traceback (most recent call last):
File “/Users/rae/work/osaf/chandler/chandler/Chandler.py”, line 10, in ?
import os, PyLucene
ImportError: No module named os
[3095 refs]
to having Xcode decide to use the “Java Debugger” to debug the RunChandler script, to Xcode itself crashing when I change the path for the executable over and over. And then there is the ever-helpful “Program failed to load.”

I’ll keep trying, but it certainly isn’t as easy as I had hoped it would be.

Leave a Reply