"We write code so good we don't need debugging" - ever heard this?
I have, right before "we can't find enough developers".
As if you:
(classical) debuggers - funny name for something that gets reinvented every other year
inspectors - tools to inspect current state - shells basically
tracers/tracing - tools or techniques that allow recoding what the program is doing
who does that syscall? hard to tell
pyrasite/pydbattach/pptop roughly do this with GDB:
PyGILState_Ensure() PyRun_SimpleString('import sys; sys.path.insert(0, ... bla bla bla') PyGILState_Release($1)
Notice anything suspicious?
Another way (reuse signal handling routines):
Py_AddPendingCall(PyRun_SimpleString, 'bla bla bla')
Trivia: did you know signal handlers always run in the main thread in Python?