Frames not available in non-suspended state


I am trying to debug a pytest script that hangs.  There are threads that use paramiko to execute remote commands.  
The hang involves those threads failing to sense that the remote  command has completed.

If I run with the debugger (running on a remote server),  I can pause it.

The problem is that the threads I care about only give me "frames not available in non-suspended state."

Any ideas how to get past this?


Hi Adam, could you please switch the suspend policy for a breakpoint to All instead of Thread in Run | View Breakpoints?

Has it helped?


Hi, I have the same problem.

I have changed the breakpoint default (and it's current state) to suspend 'All', but the problem remains.

My code is the following:

from threading import Thread, Event
from time import sleep
import os
import multiprocessing
def foo(process_name, event=None):
if event:
print(f'{process_name} waiting')
print(process_name, os.getpid(), 'finish')

if __name__ == '__main__':
e1 = multiprocessing.Event()
e2 = multiprocessing.Event()

t1 = Thread(target=foo, args=('t1', e1), name='t1')
t2 = multiprocessing.Process(target=foo, args=('t2', e2,), name='t2')


while True:

So when i run on debug mode and am waiting on the sleep(0.5), i get that i can't reach the running thread t1.

Using python 3.7.5, pycharm 2020.1 Pro, win10


Same issue here. I get a mutex lock somewhere, but when I pause it I just get a thread that "works" and is fine but I have no idea which other thread is broken... setting breakpints/enabling all threads is not working as I dont know where it fails. This is useless. Why is there no global checkbox that tells it to monitor all threads?!


Same issue and useless help comment with PyCharm 2022.2


Please sign in to leave a comment.