In Unix OS, is it possible to detect if a python program running in pdb, is in "break" or "waiting" state, given the process ID?
I would like to detect that from outside the python program itself, i.e. a secondary program/process monitoring it.
I tried tailing the stdout of the process, and checking for (pdb). Also tried detecting if process is in sleep state (S+), but this could happen for other reasons.
Thank you!