1

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 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.