简体   繁体   中英

Visualize call stack of method calls in Visual Studio 2010

I wonder if there is a way to visually represent a call stack of a method.

Meaning for example:

  • ServiceAdapter.GetMessage
    • calls Manager.GetMessage
      • calls Agent.GetMessage
        • calls Repo.GetMessageById
      • calls Agent.GetUserById
        • calls Repo.GetUserById
      • calls Agent.GetRating
        • call Repo.GetRatingForMessage
    • ..

This way it would by very easy to navigate through a piece of code and visualize its dependencies.

Is there an existing extension for this in Visual Studio?

You're looking for the Call Hierarchy window.
Select a method, then press Ctrl + K, T.

在方法名称上,单击鼠标左键并单击“调用层次结构”。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM