This is a question about the way forward, and a request for advice 
regarding
remote debugging between window and linux.

For ourselves internally, and for our customers, we are using
eclipse+pydev+pydevcarm as the Python IDE of choice.  Pydevcarm is a
local plugin on top of pydev.  So far both eclipse and the application
where the python code is run and debugged, is on linux, sometimes on
on different host machine but with a shared file system.  This setup
work well.

I'm now trying get the grips of a deployment alternative where eclipse
is running on local *windows* workstations, and the remote application
runs on a linux server.  eclipse is locally installed on the window
machines, and on the linux server there is one centrally installed
eclipse for this purpose. I presume that the only used bits from the linux
installation is the python files in
plugins/org.python.pydev.debug_1.5.x.xxx/pysrc .  SMB/Samba is used
for shared file system.

Obviously the paths for both the project source files and the libs differ.

There appears to be two different mechanisms in place for dealing with
the necessary path translation.

Approach number one is mentioned in
http://pydev.org/manual_adv_remote_debugger.html, note 3.
There is basic machinery in pydevd_file_utils for doing the path 
translation.
The variable PATHS_FROM_ECLIPSE_TO_PYTHON needs to be edited, to eg

PATHS_FROM_ECLIPSE_TO_PYTHON =
     [ ("\\\\wake","/users")
      ,("C:\Python24\Lib", "/usr/lib64/python2.4")]

Although this machinery seems to work well the little I've tested, it
is not an option for individual users to edit the globally installed
pydevd*.py.  Even if all windows eclipses are installed in the same
way so that the above would work for all, it interfers with
linux<->linux remote debugging.  What might work is to have an version
of pydevd_file_utils in the python path of the application, which sets
the value of PATHS_FROM_ECLIPSE_TO_PYTHON depending on who wants to
debug python code in the application.

In approach number two the eclipse user sets the translation paths in
prefereces->pydev->debug->source locator. Apparently when the debugger
encounters a path that is not matched, it asks for more pairs to enter
this table.  But when I tried it it asked for paths that should have
matched.

There is a similar path translation problem for run in application and
(re)load in application, but that ie easier to deal with since one can
send e.g project relative paths, rather that absolute paths.

So what are the intentions with these two, mutually exclusive,
approaches to the path translation?  Is the first one now obsolete and
the second one the way to go?  What is your recommendation on how to
deal with this?  Is there any ongoing development in pydev in this
area?

Thomas Johnsson
Jeppesen Systems, Göteborg, Sweden


------------------------------------------------------------------------------

_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to