Archive:Debug Python Scripts with Eclipse
Jump to navigation
Jump to search
Here is a method you can use in order to use the Eclipse remote debugger with you Python scripts/plugin.
Note: you can more information if you prefer to use WinPDB instead: Debugging Python Scripts on Linux with WinPDB
Prerequisite
- Any platform able to run Eclipse IDE (Windows 32bit, Mac Carbon 32bit-64bit, Mac Cocoa 32bit-64bit, Linux 32bit-64bit): it is the platform from where you will run the debugger IDE
- Pyhton interpreter 2.4 (same version as XBMC) install on the machine running Eclipse
- Any platform running XBMC (Xbox, Linux, MACOSX, Windows): it is the platform running Python scripts/plugin connecting with the remote debugger.
XBMC installed on Ubuntu (should work just fine on Windows and Mac too)
- Pydev plugin for Eclipse IDE: Pydev is a Python IDE for Eclipse, which may be used in Python, Jython and IronPython development.
Prepare and Setup Eclipse
Install Eclipse
- Download Eclipse IDE and install it
Note: in our example Eclipse Galileo (3.5.1) is used
Install Pydev in Eclipse
- In Eclipse go in: Help -> Install New Software...
- Clic on the Add button and add Pydev website as a source: http://pydev.org/updates
- You will see the window below:
- Check PyDev box and follow the steps in order to install PyDev
Note: in our example PyDev 1.5.5
Configure Pydev and Eclipse
- Go in Window -> Preferences
- Pydev then Interpreter Python
- Clic on Add and Browse for your Python Interpreter 2.4, you should see something like that:
This will help in order to have Python code completion (except for XBMC modules)