Can't remotely debug with pycharm anymore

Debugging remotely through ssh with pycharm used to work fine, but after the latest update it no longer works. after hitting a breakpoint, the variables window shows "collecting data" forever, trying to inspect any variable by typing its name in the console results in things hanging for awhile and finally printing a blank line, and continuing execution via f8 or f10 just freezes everything. I tried to switch to suspect everything instead of suspend thread in breakpoint options, and when i do this and then try to inspect variables in the console i get the following error:

Traceback (most recent call last):
File "/private/home/abaevski/.pycharm_helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 1647, in do_it
result = pydevd_console_integration.console_exec(self.thread_id, self.frame_id, self.expression, dbg)
File "/private/home/abaevski/.pycharm_helpers/pydev/_pydevd_bundle/pydevd_console_integration.py", line 188, in console_exec
updated_globals.update(frame.f_globals)
AttributeError: 'NoneType' object has no attribute 'f_globals'

attempting to continue execution still freezes everything.

Note that I can debug simple programs, but anything more complex (with GPU utilization, multiple processes, etc) leads to this behavior. I am not sure what exactly is the difference is

Any ideas?

1 comment
Comment actions Permalink

ok, i have found the issue. i was running pytorch code with num_workers in dataset > 0 (which spawns a child process to load data) and this caused pycharm debugging to not work

1

Please sign in to leave a comment.