Table of Contents
Mapping source directories
Map source directories option available from WinGDB menu, allows to map local directories with source
code to their remote equivalents. After the mapping is established, WinGDB will recognize breakpoints set
in local sources and IntelliSense will work. For files specific to Linux implementation, for which WinGDB
is unable to find local counterparts, cached copies still will be used as a fallback. Also differing
files are detected and cached copy is used in case of differences between the local and the remote file.
The mappings can be configured either for separate storage (the local and the remote machine have
independent disks), or shared storage (there is one copy shared by e.g. Samba).
Source directory mapping manager
- Login: determines the login for which the mappings are active. This is the same
user@host[:port] format as in other WinGDB commands. You can enter mappings for
multiple different logins. It is useful when you debug on multiple machines
and have different program directories.
- Add Login: adds new login and makes it the current one.
- Remove Login: removes current login and all its mappings.
- Synchronize saved files: Enables or disables synchronization of saved files
for all synchronized mappings for current login.
- Copy mappings from: allows to copy all mappings from another login.
- Mappings: list of mappings applicable to current login. Full description of columns in next section.
- Add Mapping: adds new mapping for current login.
- Remove Mapping: removes selected mapping(s) for current login.
- Edit Mapping: edits selected mapping.
- Session: login for which the mapping is applicable.
- Local path: a directory on local host.
- Remote path: a directory on remote host, equivalent to local path.
- Type: determines type of mapping.
- Synchronized: use this option when you have sources on two physically separate locations
(different disks) and there is a need to synchronize changes between them.
- Shared: use this option when you have sources shared between two machines in common
location (e.g. by Samba). There will be no synchronization and WinGDB will assume the corresponding
files to be always identical.
- Unsynchronized: use this option when you have physically separate sources that have
platform-specific versions. There will be no synchronization and WinGDB will assume the corresponding
files to be always different.
- Synchronize on save: this option toggles automatic synchronization when edited file is saved.
Remote counterpart will be overwritten with new contents.
- Open remote copy when differences encountered: this option toggles checking whether the remote
file is identical (besides line endings) to the local counterpart. If the files differ, the remote
copy is opened from the cache instead of opening the local file. This prevents from debugging
the source code which may not correspond to the program, at the expense of the need to set breakpoints
again and not working IntelliSense. Usually most files should not differ, unless you edit
them on remote side or have platform-specific versions.
You can add several mappings for each login. Also the mappings may include one another. In this case,
for each file the "most specific" mapping will be considered.
In local and remote paths, you can use environment variables (from the local machine)
in the form $(VariableName). Note that they are system environment variables,
not Visual Studio macros -- although these variables can be also used in contexts
allowing the macros, the reverse does not generally apply. In the mapping configuration
only environment variables are allowed.
Opening connections for mappings
When you start Visual Studio, connections for mappings are not opened by default
and the files will not be synchronized. You can open the connections and enable
synchronization using the Open connections for source mappings option
from Connections menu. Only connections for logins which have Synchronize saved files
option enabled will be opened by this option.
Table of Contents
Copyright (C) 2008-2019 SOFT-ERG. All rights reserved.