Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Debugging embedded python
Dave last edited by
I have been struggling some time to get my embedded python interpreter running in the qt creator debugger.
When I just run my application outside the debugger it all works fine.
But when i try to run my application in the debugger it suddenly fails in the python function PyImport_ImportModule(); The module I try to import is located in a subfolder of my application.
So at startup I add this subfolder as an absolute path using PySys_GetObject("path") and PySys_SetObject("path",object) this seems to work when running normally. At debug time the debugger seems to give an alternate environment to the application so i try to correct this by adding all the required paths for my python interpreter however it still does not seem to work under debug.
I want to use the PyImport_ImportModule function because it returns the module and i want to keep using the namespace/dictionary of it later.
I also tried to modify the enivornment path variable and the working dir of my process before python initialisation to include the correct path, but nothing seems to work.
Does anyone experience similair problems or know how to get debug working in this situation?