Search code examples
pythoneclipsepydev

PyDev Debugging


My interpreter is the python 2.6 interpreter that comes with cygwin.

I have a pydev project that contains a linked folder. In the folder, due to outside constraints, I have two sub-folders, one with a bunch of scripts I develop, and one which serves as the run directory for all my run configurations.

When I run the project (not debug) everything works fine.

However, when I choose to debug the project, my custom modules aren't found, and the import fails.

I tried adding my scripts folder to PYTHONPATH, but that didn't help, and when I printed sys.path It contained weird stuff, all of the form:

<path to run directory>/<path to entry in PYTHONPATH>

I can't make heads or tails out of it.

I'll appreciate any help.


Solution

  • Unfortunately, that's a known issue. PyDev does not support Cygwin for debugging. The primary reason is that the paths that Python reports don't match the paths you configure in windows, so, a translation step would be needed for each path (even some other areas such as code-completion or code-analysis could have problems).

    You can probably do this translation yourself at eclipse/plugins/org.python.pydev_x.x.x/pysrc/pydevd_file_utils.py (instructions on the file), but note that this may be more work than it's worth (the recommended approach is using a native Python install on Windows instead of through cygwin) -- or if you need an interpreter on Linux, develop on Linux :)