If ANTS Performance Profiler cannot locate usable .pdb (debugging symbols) files for the application you are profiling, it can't display method source code or show line-level timings. You may see theerror message "The profiler did not find any methods with source code."

This can meant that:

This page explains how to fix these issues.

To fix other issues causing missing results, see Troubleshooting missing results.

No .pdb file exists for the application

The method for creating a PDB depends on the type of application you are profiling.

If your application's namespace includes multiple DLLs, ANTS Performance Profiler will look for a PDB for each of them. Line-level profiling results and source-code display will be available only for methods in those DLLs for which ANTS Performance Profiler can locate the PDB.

ASP.NET web applications:

  1. Close ANTS Performance Profiler.
  2. Open the application's web.config file.
    For instructions, see How to enable debugging for ASP.NET applications (MSDN)
  3. Find the compilation tag and set its debug attribute to true.
  4. Restart ANTS Performance Profiler and try to profile your application again.

Simply rebuilding the assembly won't work unless debugging is enabled. Once the .pdb file has been created, you can set debug to false without affecting it.

Other types of application:

See Debug settings and preparation (MSDN).

Decompiling methods without source

If you don't have a usable PDB file for an assembly, you can still display source code in ANTS Performance Profiler using the integrated decompilation feature. Line-level timings will be unavailable. For details, see Working with integrated decompilation.

A .pdb file exists, but ANTS Performance Profiler cannot locate it

For each of an application's assemblies, ANTS Performance Profiler looks for PDBs in the directory where the assembly's DLL is stored. (For ASP.NET web applications, this is by default the bin or app_bin folder.) If the PDB for a profiled assembly isn't in this folder, move it into this folder to enable line-level profiling and source code display.

Using a global PDB directory

If you can't move the PDBs for all your DLLs into a folder where ANTS Performance Profiler can find them (for example, if your application uses assemblies from the Global Assemblies Cache), you can bypass the problem by creating a global debugging symbols (PDB) directory.

Alternatively, if your application uses assemblies from the Global Assemblies Cache, you can copy your PDBs to the same directory as your DLLs in the Global Assemblies Cache. 

A .pdb file exists, but is out of date

If the assembly has been changed since its .pdb file was generated, the PDB may be out of date. To update it:

  1. Enable debugging by following the steps under No .pdb file exists for the application above.
  2. Rebuild your assembly.
  3. Restart ANTS Performance Profiler and try to profile your application again.

Simply rebuilding the assembly will not work unless debugging is enabled.

A corrupt .pdb file causes ANTS Performance Profiler to crash

If ANTS Performance Profiler encounters a corrupt PDB during profiling, the profiler may crash and fail to return results. The corrupt PDB might belong to a third-party DLL or to the application you want to profile.

There are two ways to profile an application with a corrupt PDB:

Getting help

If you still can't fix your problem, please contact Redgate support. Supply as much information as you can, including: