dotPeek
 
Get dotPeek

Presentation options for compiled code

Last modified: 15 May 2024

Depending on the settings, on the availability of PDB information, and on the applied navigation command, dotPeek can present compiled code in the code viewer in different ways:

  • Metadata view — this view only shows signature of the type and signatures of all its members. You can also display this view by applying the Navigate To: Metadata View command from the code viewer or from the Assembly Explorer window.

    tip

    You can use File Structure window as an alternative to using Metadata View.

  • Decompiled code — this view displays decompiled C# code corresponding to the type that you open or navigate to. This view is used by default if no debug information is available for the type or if you deliberately navigated to this view using the Navigate To: Decompiled Sources command. You can show or hide compiler-generated code for this view.

  • Code from symbol files — this view displays original source code from symbol files in C# or VB.NET. dotPeek retrieves symbol files either from local sources or from symbol servers using debug information.

By default, dotPeek does not decompile methods that contain more than 50 000 instructions. Such methods are normally auto-generated and do not present any interest, but decompiling such methods will increase decompilation time. Such methods will be displayed with a single comment // ISSUE The method is too long to display (N instructions). To change this behavior, clear the Decompile very long methods checkbox on the Decompiler page of dotPeek options Ctrl+Alt+S.

By default, the code presentation mode of the document is color-coded on its tab. If necessary, you can disable that by clearing the Enable tab colors to indicate code presentation mode checkbox on the Environment | Tabs page of dotPeek options Ctrl+Alt+S.

dotPeek: Tab colors for different code presentation modes

To configure how the decompiled code is presented in the code viewer, use the following checkboxes on the Decompiler page of dotPeek options Ctrl+Alt+S:

To view the summary and the presentation mode of an opened document, right-click its tab header and choose External Source Information in the context menu. In the dialog that appears, you can learn name and location of the assembly where the document belongs as well as the external source provider - metadata viewer, decompiler or symbol server.