-
Notifications
You must be signed in to change notification settings - Fork 149
Remote custom script debug
Yuriy Movchan edited this page Apr 10, 2018
·
1 revision
- Install PyDev Eclispe plugin from Eclipse Markeplace.
- Open Debug perspective.
- Start the remote debugger server. Menu: PyDev->Start Debug Server.
- Log into CE.
- cd /opt
- Download pydevd-1.1.1.tar.gz or more recent. Link: https://pypi.python.org/packages/39/66/ef4821f24953ef4e9be73de99209fa74d14b4fa90559571553c7c7ecaf61/pydevd-1.1.1.tar.gz
- tar -xzf pydevd-1.1.1.tar.gz
- rm -rf pydevd-1.1.1.tar.gz
- ln -sf /opt/pydevd-1.1.1 /opt/pydevd
- Add ater import section:
REMOTE_DEBUG = True
if REMOTE_DEBUG:
try:
import sys
sys.path.append('/opt/pydevd')
import pydevd
except ImportError as ex:
print "Failed to import pydevd: %s" % ex
raise
- Add next lines to all place where you need to add breakpoints
if REMOTE_DEBUG:
pydevd.settrace('DEV_IP', port=5678, stdoutToServer=True, stderrToServer=True)
- Enable script.
- Start authentication process.
- Eclipse after executing line with
pydevd.settrace
should show dialog to selectt scritp source. - After selecting script file it's possible to debug it.