Visual Studio 2010 contains a very useful feature called ‘View Call Hierarchy’. This feature lets you dive into all the calls that are made ‘to’ a method, property or constructor as well as all the calls that are made ‘from’ that method, property or constructor. As given in the documentation “You can examine several levels of code to view complex chains of method calls and additional entry points to the code, which enables you to explore all possible execution paths”
For example, right clicking on the LogOff() method brings up the ‘View Call Hierarchy’ option in the context menu
Clicking on the ‘View Call Hierarchy’ option brings up the following window which displays the calls that are made to LogOff() as well as the calls that are made from LogOff().
Double clicking these calls takes you to the specific line of code where the call is made from or where the call is made to. Extremely handy!
Tweet
2 comments:
Netbeans displays the call hierarchy as a graphic image. It has been available in the last few versions.
I started my recent C++ job without having any experience with an IDE. The company provided VS 2008 and Netbeans. I learned both, side by side. My favorite is Netbeans.
Netbeans has click through navigation, dock/undock windows, a better user interface for searching, and search results are kept around in tabs so you can refer to previous searches. And no expensive license.
Is possible to run call hierarchy from csharp code?
Post a Comment