Detect if a python pdb process is in break or waiting state

14 views Asked by At

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!

0

There are 0 answers