These pages cover ANTS Performance Profiler 8, which is not the latest version. Help for other versions is also available.

Skip to end of metadata
Go to start of metadata

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:

  • No .pdb file exists for the application
  • A .pdb file exists, but ANTS Performance Profiler can't locate it
  • A .pdb file exists, but is out of date
  • A corrupt .pdb file is causing ANTS Performance Profiler to crash

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.

Icon

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.
Icon

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.
Icon

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:

  • Delete the corrupt PDB.

    This will prevent you from viewing source code referenced in the deleted PDB, but will display line-level code for all other methods.

  • On the settings screen, in the Profiling mode dropdown menu, choose Method-level timings; all methods inc. framework.
    This will prevent the corrupt PDB from being read, avoiding the cause of the crash. It will also prevent you from viewing source code referenced in the deleted PDB. Line-level timings are unavailable in this profiling mode.

Getting help

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

  • the type of application you are trying to profile
  • the version of ANTS Performance Profiler you are using
  • your computer's operating system
  • the steps you have already tried
  • any error messages ANTS Performance Profiler has generated, including any in the log files
  • No labels