ANTS Performance Profiler 7

Troubleshooting PDB problems

If ANTS Performance Profiler can't 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 receive the message "The profiler did not find any methods with source code."

This can indicate one or more of the following:

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

This page explains how to resolve these issues.

To resolve 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.

Note that, if the 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.

Note that simply rebuilding the assembly will not 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 have no 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 still 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 is located somewhere else, move it into this folder to enable line-level profiling and source code display.

Using a global PDB directory

If you are unable to 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.

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. Recompile your assembly.
    1. Restart ANTS Performance Profiler and try to profile your application again.

Note that 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 Application Settings dialog, in the Profiling mode dropdown menu, choose Method-level timings; all methods (faster).
    This will prevent the corrupt PDB from being read, avoiding the cause of the crash, but will also prevent you from viewing source code referenced in the deleted PDB. Line-level timings are also unavailable in this profiling mode.

Getting help

If you are still unable to resolve this problem, please contact Redgate support. Supply as much information as you can in the Description box, 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. To locate log files for ANTS Performance Profiler, see Log files.

Didn't find what you were looking for?