#1016 Remote debugging path translation fails

closed-fixed
debugger (210)
5
2009-11-19
2009-11-19
desolat
No

Setup: Python 2.6, Pydev 1.5.1, Client (dev host) is Windows, Server (target host) is Linux

Translation of the client to server path in the NormFileToServer() function
fails because the backslashes in the part of the client path after the
client prefix do not get replaced and thus Python on Linux can not find the
resulting file.

Example: client prefix is "C:\", server prefix is "/home/user", client file
path is "C:\package\source_file.py"
NormFileToServer() translates it to "/home/user/package\source_file.py" ->
notice the backslash! This path is not resolvable by Unix and
pydevd.py:processNetCommand() will fail at line 462.

Workaround: Translate the backslashes to in the translated path to os.sep,
thus on every system the correct path format will apply. (Also Windows
would also cope with slashes!).

Discussion

  • Fabio Zadrozny
    Fabio Zadrozny
    2009-11-19

    Fixed for 1.5.2

    Git
    %h 3dd7b0b
    %ct 1258654778

    I did it a bit different, analyzing the actual paths the user sets to determine the slashes. I'm attaching the final version so that you can test there.

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2009-11-19

    • status: open --> closed-fixed
     
  • Fabio Zadrozny
    Fabio Zadrozny
    2009-11-19

    pydevd_file_utils.py

     
    Attachments