dotTrace Help

Previewing Source Code

dotTrace automatically locates the underlying source code for selected functions. To make the source code visible in dotTrace, let it know where .pdb files for your project are located, or specify path to the source code.

Note that in case you choose the Line-by-Line profiling type, Source View will show additional information about how many times a particular line of code was invoked. Learn more in Source View and Line-by-Line Profiling.

To view source code

  • On the menu bar, choose View | Source View.

Source_View_1

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 easily do it right in Source View.

To view IL code

  1. Select a function.
  2. Open Source View.
  3. Select the Show IL Code check box in Source View.

IL code is displayed under each code statement.

Source_View_2

Sometimes source code is not available right here right now, however dotTrace can recreate source code close to original using a built-in decompiler.

To view decompiled code

  1. Select a function.
  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 check box and click Apply.
    • On the menu bar, choose View | Options. The Options dialog box opens. Select the Decompiler node on the left pane. Select the I accept the terms of the license agreement, allow to decompile check box in the right pane, then click Save to apply changes.
  5. The corresponding decompiled code is immediately displayed.

See Also

Last modified: 26 June 2015