File Location Map Examples


Home » Support » Index of All Documentation » Wing IDE Reference Manual » Advanced Debugging Topics » Remote Debugging » File Location Maps »

The best way to understand location mapping is to inspect a few examples.

Defaults Explained

The default value for the Location Map preference contains one entry for 127.0.0.1 where the mapping is set to None (in Python this is represented as {'127.0.0.1':None}). This is equivalent to the more verbose Python representation of {'127.0.0.1':[('/','')]}. It converts full paths on the debug server to the client-side URLs without altering any part of the full path.

Two Linux/Unix Hosts

Here is an example setting for debug.location-map that would be used if running Wing on desktop1 and debugging some code on server1 with IP address 192.168.1.1:

debug.location-map={
  '127.0.0.1':None,
  '192.168.1.1':[('/home/apache/cgi', '/svr1/home/apache/cgi')]
}

In this example, the files located in /home/apache/cgi on server1 are the same files seen in /server1/home/apache/cgi on desktop1 because the entire file system on server1 is being shared via NFS and mounted on desktop1 under /svr1.

To enter this value in Preferences, you would add 192.168.1.1 as a new Remote IP Address and a single local/remote mapping pair containing /home/apache/cgi and /svr1/home/apache/cgi.

IDE on Linux/Unix with Debug Process on Windows

If you are debugging between Windows and Linux or Unix, some care is needed in specifying the conversion paths because of the different path name conventions on each platform. The following entry would be used when running Wing IDE on a Linux/Unix host and the debug process on a Windows host with ip address 192.168.1.1:

debug.location-map={
  '127.0.0.1':None,
  '192.168.1.1':[(r'e:\src', '/home/myuser/src')],
}

In this example the Linux/Unix directory /home/myuser is being shared via Samba to the Windows machine and mapped to the e: drive.

In the Preferences GUI, you would add 192.168.1.1 as a new Remote IP Address and a single local/remote mapping pair containing e:\src and /home/myuser/src.

IDE on Windows with Debug Process on Linux/Unix

If running Wing IDE on a Windows host and the debug process on a Linux/Unix host with IP address 192.168.1.1, the following would be used instead for the same file locations:

debug.location-map={
  '127.0.0.1':None,
  '192.168.1.1':[('/home/myuser/src', 'e:/src')],
}

Again, note the use of forward slashes in the URL even though the file is on a Windows machine.

In the Preferences GUI, you would add 192.168.1.1 as a new Remote IP Address and a single local/remote mapping pair containing /home/myuser/src and e:/src.

Two Windows Hosts

If running Wing IDE on Windows and the debug process on another Windows machine with IP address 192.168.1.1, the following would be used:

debug.location-map={
  '127.0.0.1':None,
  '192.168.1.1':[(r'c:\src', 'e:/src')],
}

In this case, the host where Wing is running has mapped the entire remote (debug process) host's c: drive to e:.

In the Preferences GUI, you would add 192.168.1.1 as a new Remote IP Address and a single local/remote mapping pair containing c:\src and e:/src.

Two Windows Hosts using UNC Share

A UNC style path name can be used on Windows XP as follows:

debug.location-map={
  '127.0.0.1':None,
  '192.168.1.1':[(r'c:\src', '\\server\share\dir')],
}

In this case, c:src on the remote host, where the debug process is running, can be accessed as \serversharedir on the machine where Wing IDE is running.

In the Preferences GUI, you would add 192.168.1.1 as a new Remote IP Address and a single local/remote mapping pair containing c:\src and \\server\share\dir.

« 13.1.0. File Location MapsTable of Contents13.1.1. Remote Debugging Example »