On 15 October 2012 12:51, Dmytro Guzenko <Dmytro.Guzenko@pharm.kuleuven.be> wrote:

On a related note – is there a way to debug the python code of cctbx and step into the c++ code? Debugging is my favorite way to figure things out, but with cctbx most interesting things are hidden. I am using Eclipse + PyDev now.


I have done this successfully using WingIDE+Visual Studio on Windows and WingIDE+Xcode on Mac. First you will need a debug build of the cctbx, which you can get by adding --build=debug to the libtbx.configure options and recompiling. Then you need to first stop at a breakpoint in your Python debugger, then in your C++ debugger you need to find the "Attach to Process" (or similar) option in the menu and find the current Python process to attach to. Then when you step through your Python debugger then any C++ breakpoints should be caught in your C++ debugger.

Hope that helps,

Richard