Source Paths Tab
It is important that the Source Debugger always opens the correct source file (.SRC or .WEB file) and symbol file (.SYM) for the module being examined.
The Source Paths tab enables the Source Debugger to specify the path to the correct version of a source file when the source file is stored on a PC other than the one on which the Source Debugger is running. It further enables the correct version of a source file to be opened when examining a dump file.
When there are no entries in the fields of the Source Paths tab, the Source Debugger attempts to open the file from which the .RUN file was compiled. For example, if C:\VTScada\VTS\AnalogIn.RUN is the .RUN file containing the module, "AnalogInput" and it was compiled from the source file C:\VTScada\VTSAnalogIn.SRC, the Source Debugger will attempt to open the source file C:\VTScada\VTS\AnalogIn.SRC and the symbol file C:\VTScada\VTS\AnalogIn.SYM.
A problem arises when the file C:\VTScada\VTS\AnalogIn.SRC is not the source file that was compiled to produce the .RUN file. A simple solution is to simply specify a list of paths to be searched for the source/symbol files. This, however, is not ideal, as it is possible for a module in an application layer to have the same name as one in another layer (e.g. the VTScada layer). Therefore, the specification of search paths is more complex. Thus there are three elements to the Source Paths tab of the Options dialog that control the source file searching behavior.
Substitute VTScada Installation Path
The Substitute VTScada Installation Path field will accept a path to an alternative VTScada installation folder tree. Any module compiled from a source file located within the VTScada installation folder tree will have their source/symbol files loaded from the path specified in this field.
External Folders
The External Folders list will accept one or more paths outside the VTScada installation folder tree. Any module compiled from a source file outside the VTScada installation folder tree will have their source/symbol files loaded from a path in the External Folders list. The list is parsed from top to bottom (i.e. if the source/symbol files cannot be found in the path at the top of the list, the next path down the list will be searched). Searching stops when a file is found or the end of the list has been reached.
Always Search
The Source Debugger normally only searches the paths specified in the Substitute VTScada Installation Path field and the External Folders list if the source file indicated by the module is not found. If the Always Search check box is selected, the Source Debugger will be prevented from search for the source/symbol files in the path indicated by the .RUN file. Instead the Source Debugger will be forced to search for the source/symbol files in the paths specified in the Substitute VTScada Installation Path field and the External Folders list.
The following will assist you in the proper configuration of the Source Paths tab when you are analyzing a dump file.
Most of the time, the version of VTScada that is contained in a dump file will not match the version of VTScada that is running the Source Debugger. In such cases, you want the Source Debugger to search a specific location for the source/symbol files, rather than searching the folder in which the version of VTScada running the Source Debugger is located.
For files within the dumped VTScada installation folder tree:
- Create a folder tree that mimics the dumped VTScada installation folder tree.
- Copy the source and symbol files for the version of VTScada corresponding to the dumped version.
- Paste the copied files into the new folder tree created in step 1.
- Enter the path of the new tree into the Substitute VTScada Installation Path field.
- Select the Always Search check box.
For files outside the dumped VTScada installation folder tree:
- Create one or more folders.
- Copy the source and symbol files for the version of VTScada corresponding to the dumped version.
- Paste the copied files into the new folder tree created in step 1.
- Enter the path(s) of the new folders into the External Folder list, using the Add button.
- Use the Move Selected buttons to arrange the folder list correctly.
- Select the Always Search check box.
Remote Debugging Using the VIC
For files within the dumped VTScada installation folder tree:
- Create a folder tree that mimics the dumped VTScada installation folder tree.
- Copy the source and symbol files for the version of VTScada corresponding to the dumped version.
- Paste the copied files into the new folder tree created in step 1.
- Enter the path of the new tree into the Substitute VTScada Installation Path field.
- Deselect the Always Search check box.
For files outside the dumped VTScada installation folder tree:
- Create one or more folders.
- Copy the source and symbol files for the version of VTScada corresponding to the dumped version.
- Paste the copied files into the new folder tree created in step 1.
- Enter the path(s) of the new folders into the External Folder list, using the Add button.
- Use the Move Selected buttons to arrange the folder list correctly.
- Deselect the Always Search check box.
The source files will be loaded from the server to which the VIC is connected, unless they are not found, in which case the files will be searched for on the PC running the VIC. The paths specified must therefore be on the PC running the VIC. This enables you to remotely debug a production system that does not have the source code installed on it, or has only a subset of the source code (e.g. an application layer).
Local Debugging of a Production System
For files within the dumped VTScada installation folder tree:
- Create a folder tree that mimics the dumped VTScada installation folder tree.
- Copy the source and symbol files for the version of VTScada corresponding to the dumped version.
- Paste the copied files into the new folder tree created in step 1.
- Enter the path of the new tree into the Substitute VTScada Installation Path field.
- Deselect the Always Search check box.
For files outside the dumped VTScada installation folder tree:
- Create one or more folders.
- Copy the source and symbol files for the version of VTScada corresponding to the dumped version.
- Paste the copied files into the new folder tree created in step 1.
- Enter the path(s) of the new folders into the External Folder list, using the Add button.
- Use the Move Selected buttons to arrange the folder list correctly.
- Deselect the Always Search check box.
By using paths that are either UNC names or shares on mapped drives, source files will be loaded from the production system unless they are not found, in which case they will be loaded from a networked file system.
This enables you to debug a production machine live on site, while not having to copy source files onto it.
Debugging a Production System Using Remote Control
For files within the dumped VTScada installation folder tree:
- Create a folder tree that mimics the dumped VTScada installation folder tree on the production system.
- Copy the source and symbol files for the version of VTScada corresponding to the dumped version.
- Paste the copied files into the new folder tree created in step 1.
- Enter the path of the new tree into the Substitute VTScada Installation Path field.
- Deselect the Always Search check box.
For files outside the dumped VTScada installation folder tree:
- Create one or more folders on the production system.
- Copy the source and symbol files for the version of VTScada corresponding to the dumped version.
- Paste the copied files into the new folder tree created in step 1.
- Enter the path(s) of the new folders into the External Folder list, using the Add button.
- Use the Move Selected buttons to arrange the folder list correctly.
- Deselect the Always Search check box.
As indicated in the instructions above, you will have to copy the source/symbol files onto the production system, however, you may copy the source/symbol files into separate folder trees on the production system, making tidy-up at the end of the debugging session easier by allowing you to later delete the source/symbol files from the separate tree. This minimizes the risk of your inadvertently deleting important files from the production system when debugging using source files that you do not want to leave on the production system when finished.
The user interface of your debugging session will be running on the production server’s display. Ensure that this does not interfere with system operation. While this method of debugging can be used, other methods are preferred.