I am using boost::python to embed python interpreter to my executable. I call python functions from C++ side. However, I cannot debug python side of the code. It seems that this is not a popular issue but I really need to debug the python code called from C++. It seems that visual studio has a support for this but I am using ubuntu. Is there a way that I can achieve debugging python code called from C++. I can use another library if boost::python does not support that.
1 Answer
Python has a native debugger called pdb. Use the lines:
import pdb
pdb.set_trace()
to start an interactive debugging session at any point in your python code.