debug python scripts from pythonQt application with pdb
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
According to an earlier thread i started debugging with pdb in the embedded PythonQt
this works well except the pdb reads from stdin, must find a way to get the input from an widget or other File Handle.
Question is how to "pdb" an running script.
I started a script in a context, the script takes a long time to execute.
I now want to start debugging on the script. I.E. attach debugger to running script.
So i started a second script, in the same context as the first one and call
import pdb
pdb.set_trace()
to enter debugger.
Unfortunatly the script immediatly exists with SIGSEV. Is there a way to execute pdb on a running script? Or at least to "pause" a runnict script execution, called by
PythonQtObjectPtr.evalScript(....)
After some work i was able to run it in debugger.
The signal comes from here (object.c)
PyObject
PyObject_RichCompare(PyObject v, PyObject w, int op)
{
PyObject res;
--> if (Py_EnterRecursiveCall(" in cmp"))
found solution, decribed in my other posts
https://sourceforge.net/p/pythonqt/discussion/631393/thread/8d49df35/