Remote Custom Script Debugging#
The following guide will explain how to debug custom interception scripts.
Prepare Eclipse#
- Install the PyDev Eclipse plugin from the Eclipse Markeplace
- Open Debug perspective
- Start the remote debugger server by navigating to
Menu>PyDev>Start Debug Server
Prepare CE#
- Log into the CE chroot container
- Change directory into the opt folder:
cd /opt - Download pydevd-1.1.1.tar.gz or later
tar -xzf pydevd-1.1.1.tar.gzrm -rf pydevd-1.1.1.tar.gzln -sf /opt/pydevd-1.1.1 /opt/pydevd
Enable Remote Debug in Custom Script#
-
After the import section, add:
``` 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 the following lines wherever breakpoints are needed:
``` if REMOTE_DEBUG: pydevd.settrace('DEV_IP', port=5678, stdoutToServer=True, stderrToServer=True) ```
Start Flow to Trigger Breakpoint#
- Enable script
- Start authentication process
- After executing line with
pydevd.settrace, Eclipse should show a dialog to select script source - Select the appropriate script file and debug