Open positiveczp opened 6 years ago
Hi, the main Python VM runs in the main UE thread, so you cannot interrupt it without interrupting the UE loop. I think you could try adding the breakpoint in a new python thread (never tried it)
why never try it ? how can i debug use pycharm?
"i" never tried it :) Well just try my suggestion, i do not use pycharm, any feedback will be useful
that is say : we can not use remote debug with pycharm
Sorry i do not understand what you mean. I gave you a possible solution, have you tried it ?
a possible solution ? try adding the breakpoint in a new python thread?
yep, it is a common pattern, if you want ue to continue running you cannot block it. Using a different python thread will allow you to spawn the debug server and eventually attach to the right thread from the debugger client. This works in plain pdb, no idea for pycharm
ok, thank you very much
Did you get pycharm remote debug to work with UE4? If you did, can you share? Thank you.
how to use pycharm remote debug in python console, my code is
def test(): import os import sys sys.path.append(os.path.join(os.path.dirname(file), 'pycharm-debug')) sys.path.append(os.path.join(os.path.dirname(file), 'pycharm-debug.egg')) print 'pycharm_debug init' import pydevd pydevd.settrace('127.0.0.1', port=5555, stdoutToServer=True, stderrToServer=True, suspend=False) print 'pycharm_debug ok'
test()
when running this code, the ue4 will block