Steps to debug a program on a remote machine without using remote deployment.
- Start the debug server in pycharm and specify a port such as 21000
- SSH remote forward a port e.g.
ssh host -R 21000:localhost:21000 - Start a Python process and insert the following line (first
pip installpydevd-pycharm`):
import pydevd_pycharm; pydevd_pycharm.settrace('localhost', port=21000, stdoutToServer=True, stderrToServer=True)