Search code examples
visual-studioprofiler

Visual Studio Profiler error "symbol file does not contain source information or cannot be found"


I get below error when I try to open the source code of DLL used in profiler report.

  • Profiling Type: Instrumentation
  • application Configuration: Debug ,any-cpu
  • DLL Configuration :Debug ,any-cpu
  • Visual studio : 2017,2019,2022

I was able to open source code in CPU profiling report but not opening in Instrumentation Profiling report.

CPU Profiler:

enter image description here

Instrumentation Profiler:

Instrumentation Profiler

Clicked on Symbol settings and added .pdb file path. But the source code not loading. How to view source code of DLL in Instrumentation Profiler report.


Solution

  • In Performance Explorer window,

    1. Under profiler session - Right-click Targets and then select Add Target Binary-> select the .dll file
    2. Right click on session and select start profiling

    In the New Instrumentation report I am able open source code of DLL.