dotTrace 2023.2 Help

Source View

The Source View window shows the source code of the profiled application. After you select a method in Call Tree, Source View will automatically locate its underlying source code. To make the source code visible, you must provide dotTrace with project symbol .pdb files or specify the path to the project source code.

Unlike other dotTrace Viewer views, Source View does not work as a filter but only displays source code.

Source View is available only on Windows.

To open the Source View window

  • In the main menu, select View | Source View.

If you need to debug your code at a low level or for some other reason examine the code emitted by the compiler, you can do it right in Source View.

To view IL code

  1. Select a method in Call Tree.

  2. Open Source View.

  3. Select the Show IL Code checkbox in Source View.

    IL code will be displayed under each code statement.

In some cases, source code is not available, however Source View can recreate source code close to original using the built-in decompiler.

To view decompiled code

  1. Select a method in Call Tree.

  2. Open Source View.

  3. Click Decompiled Source in Source View.

  4. In order to enable code decompiling, do one of the following:

    • Select the I accept the terms of the license agreement, allow to decompile checkbox and click Apply.

    • In the main menu, select View | Options. The Options dialog opens. Select the Decompiler node on the left pane, accept the license terms, and click Save.

Configure Path to Source Code

As Source View can look for sources on local disks or network shares, you can specify a local path or UNC path.

To add a new folder substitution

  1. In the main menu, select View | Options. The Options dialog opens.

  2. Select Folder substitutions.

  3. In the Folder substitutions pane, click Add. The Edit Folder Substitution dialog opens.

  4. Enter a path to the source folder and a path to the target folder where source files are actually located. Click OK.

  5. New substitution appears in the table. Click Save.

To specify the path to a source server

  1. In the main menu, select View | Options. The Options dialog opens.

  2. Select Symbol server integration.

  3. In the Symbol server integration pane, click one of the options to enable downloading PDB and source files from one of the particular servers:

    • Microsoft Reference Source Server

    • Custom source server

    Otherwise, click Don't use symbol server.

  4. Click Save.

Alternatively, you can specify the path to .pdb or source files right from Source View with the Browse for PDB button to find the desired file on your computer manually.

You can navigate right to the source code in Visual Studio from dotTrace Viewer.

To navigate from Source View to the source code in Visual Studio

  1. Select a method in Call Tree.

  2. Open Source View.

  3. Click Open in Visual Studio in Source View.

Last modified: 25 July 2023