I have been working with a Python program in an Ubuntu 14.04 machine, however, I would like to be able to debug that Python program using Eclipse with the PyDev plugin, but since my Ubuntu machine doesn't have a UI I would like to be able to use my Windows machine, install Eclipse + PyDev on it, and use it to remotely debug the Python program from the Linux machine. Does anybody know how to set that up? I've seen there is something called remote debugger in the PyDev website (http://www.pydev.org/manual_adv_remote_debugger.html), so I'm guessing that is something I may be able to use to do what I want, but I don't get how it works or how to set it up. Can anybody help?
Now, to debug that file, you can use Shift+F9 (the editor must be focused). NOTE: if you want to re-run the last executed file, you can use F11 to debug it (if you haven't configured F11 to always launch the last launch in debug mode, make sure you read the Getting Started on Running a program).
Here are the steps I took to be able to debug on Windows a program running on Linux.
Now you can step through the code, check variable values and etc...
import os
import pydevd
pydevd.settrace("EclipseIDE_HOSTNAME", port=5678)
a = 1
b = 2
c = a + b
s = 'hello world'
print(s)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With