The source view provided by dotTrace lets you quickly analyze source code and spot its problem areas without switching to another application.
However, when you build your applications using a server-based build tool such as, for example, TeamCity, and then start analyzing your local copy of the application, working with the source view can be tricky. The paths defined in the .pdb file built at a server usually cannot be used locally on your machine. In that case dotTrace will inform you that it cannot find the necessary source files.
The Folder Substitution Management feature provided by dotTrace lets you define folder mappings for application sources and effectively work with the project source files, no matter where they are located.
When the tool fails to find a source file using the current settings from the .pdb file, you are offered to locate it manually:
Click the browseâ€¦ link in the source view and locate the folder, where you know your local copies of the source files reside. As soon as you locate the root folder, the tool will scan the entire subtree and display the list of source files relevant to the function you are examining at the moment:
Just click the matching file link, to view the source.
DotTrace has now extracted the common base path and automatically created the folder mapping pattern. This pattern is automatically applied every time, when displaying this applicationâ€™s source code.
You might occasionally come across a situation, when different parts of your applicationâ€™s source code reside under different roots. This is the case to use several custom folder mappings.
To view the existing folder substitutions or create new ones, select View | Manage Folder Substitutions (Ctrl+Alt+S):
Use this dialog to add, remove, edit and rearrange any custom folder substitutions you might need.
The dotTraceâ€™s folder substitutions feature lets you work with your applicationâ€™s source code even more smoothly.