Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a "Call stack diagram"

Tags:

c#

.net

diagram

Creating a call stack diagram

We have just recently been thrown into a big project that requires us to get into the code (duh).

We are using different methods to get acquainted with it, breakpoints etc. However we found that one method is to make a call tree of the application, what is the easiest /fastest way to do this?

By code? Plugins? Manually?

The project is a C# Windows application.

like image 516
Mikelangelo Avatar asked Apr 02 '09 13:04

Mikelangelo


People also ask

How do you represent a call stack?

In the Call Stack window, open the shortcut menu. Choose Show Call Stack on Code Map (Ctrl + Shift + `).

What is a stack diagram?

A stacking diagram is a graphic representation of the total amount of area taken up by all the spaces on the floors of a building, arranged in layers floor-by-floor.


1 Answers

With the static analyzer NDepend, you can obtain a static method call graph, like the one below. Disclaimer: I am one of the developers of the tool

Call graph

For that you just need to export to the graph the result of a CQLinq code query:

code query exporting

Such a code query, can be generated actually for any method, thanks to the right-click menu illustrated below.

Select methods that use me directly or indirectly

like image 184
Patrick from NDepend team Avatar answered Sep 19 '22 18:09

Patrick from NDepend team