Child pages
  • Introducing JetBrains dotPeek

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

What is dotPeek

dotPeek: free .NET decompiler from JetBrains, the makers of ReSharper, dotTrace, and dotCover for .NET developers, as well as a family of IDEs for Java, Ruby, Python, PHP, and other languages, plus team development tools: TeamCity and YouTrack.

...

JetBrains are also about to include decompiling functionality into their forthcoming release of ReSharper 6. In fact, decompiling has been announced as part of ReSharper 6 back in February 2011, and available in ReSharper 6 pre-release nightly builds since then.

General

...

Features

Opening and

...

Browsing Assemblies

dotPeek decompiles any .NET assemblies and presents them as C# code. Both libraries (.dll) and applications (.exe) can be opened with File > Open assembly.
In addition, assemblies from GlobaL Assembly Cache can be opened via File > Open from GAC. One thing to note about the Open from GAC dialog is that you can batch-select assembly items there, and you can also filter out assemblies by entering their CamelHumps - the capitals that different parts of assembly names start with. for example, to find all assemblies with names containing Microsoft.VisualStudio.Modeling in the list of GAC assemblies, you can type mvsm:

CamelHumps support is a significant concept that also spans multiple navigation feautres of dotPeek that are highlighted below.
dotPeek provides an assembly explorer to traverse the list of opened assemblies. Expanding an assembly node lists namespaces within the assembly that can be further expanded to types and type members, as well as assembly references. Note that the assembly explorer uses the same set of icons that we're used to in Visual Studio for member identification.

...

Clicking a reference loads the referenced assembly, if immediately available. Clicking a type or type member displays decompiled code in the source code view area.

Viewing the

...

Source Code

Source code that dotPeek decompiles is presented as C#. The source code view area has the look-and-feel of editor tabs in Visual Studio, with line numbers, options for word wrap and outlining, white space marks, and tabs to open different types in.
Code syntax is highlighted ReSharper-style, with distinctive colors for properties, types, accessors, and methods.
When you put the caret on a delimiter, be it a brace or, say, parenthesis, it gets highlighted along with its counterpart, bringing focus to the scope of the particular code block you're in:

...

Navigating to a Code File

There's dotPeek also provides Go to File but in the context of dotPeek, it (Navigate > Go to File or Ctrl+Shift+N) to quickly open files and folders. It is limited to temporary files from dotPeek decompiled code cache, so you can use it as an extended tab switcher that also sees not only works with currently opened code files but also takes into account any tabs that you've ever closedopened before.

Context-

...

Sensitive Navigation Between Symbols in Decompiled Code

Navigate To
Go to Declaration
Go to Base
Go to Inheritor
Go to Implementation

  • Tool windows (Type Hierarchy)..
  • Navigate between tool windows (from code view to assembly explorer)

Searching in decompiled code

  • Find Usages: The ability to see easily all the places where a type is used. This is similar to the Used By in REflector..
  • Highlight usages in file
  • Find usages advanced
  • Quick Find

Other features

  • Same tabbed tool windows as those in ReSharper (different to the actual Tool Windows that exist). Same feel. All tool windows have collapse, expand, filtering and other features available in ReSharper, as well as possibility of tabs.

Searching in decompiled code

  • Find Usages: The ability to see easily all the places where a type is used. This is similar to the Used By in REflector..
  • Highlight usages in file
  • Find usages advanced
  • Quick Find

Other features

Keyboard-Driven Navigation Between Tool Windows

  • Navigate between tool windows (from code view to assembly explorer)
  • External Sources (Need confirmation from Ilya is this is allowed to be talked about)
  • Same Extensibility Model that of ReSharper in terms of plug-in development. You can develop plug-ins for dotPeek in the same way you can for ReSharper.