This project has moved. For the latest updates, please go here.

How to debug c++ program

Jun 15, 2011 at 1:46 AM

hi, guys!How can I debug c++ program which loaded python script using pytools? I had tried to attach the progress which is the c++ program, but the breakpoints didn't hit and available.


Jun 15, 2011 at 4:23 PM

Do you just want to debug plain old C++ code w/o debugging the Python code or were you wanting to debug both together?  I've opened a feature for the latter ( if that's what you want but we won't be able to get to that soon.  Either way I think this will need VS Pro or above as I don't believe the integrated shell includes native debugging.

If you just want plain old C++ debugging I would recommend:

   A) Make sure you attach w/ the correct kind of debug engine (select Native in the "Attach to:" area of the attach to process dialog)

   B) Make sure you can successfully load the symbols.  You can look at the Debug->Windows->Modules to see the list of loaded modules, the status of their symbols, and even to load the symbols for a specific module.  If the symbols aren't found you'll be prompted to point it at a symbol file.



Jun 16, 2011 at 12:56 AM

I'm sorry.I should explain it exactly. Thers is a c++program which loaded python script. I can step debug the python script by step when the c program running. Just Like decoda a debugger for Lua.


Jun 16, 2011 at 1:28 PM
Edited Jun 16, 2011 at 1:28 PM

Mixed Python/C++ debugging would be great. I would use it for Python code with C++ extensions.

Useful features would be

* having active break points in both Python and C++ code at the same time

* stepping into C++ code from Python code

Jun 17, 2011 at 4:30 AM

The breakpoints could be not hitting due to bug which is now fixed.  It'd be great if you could try using attach to process on the next release which will happen fairly soon and let us know how it works.

Jun 17, 2011 at 4:59 AM

I hope it would be come soon.