Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Call Hierarchy VisualizerNew to Visual Studio Code? Get it now.
Call Hierarchy Visualizer

Call Hierarchy Visualizer

piupiupiu

|
91 installs
| (0) | Free
Visualize function call hierarchies as beautiful SVG diagrams with smooth connections and interactive features
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Call Hierarchy Visualizer

Introduction

Call Hierarchy Visualizer is a Visual Studio Code extension that visualizes function call relationships in your code. It provides an intuitive and aesthetically pleasing graphical interface to help developers understand the call structure of their code, improving code reading and comprehension efficiency.

Call Hierarchy Visualization Overview

Features

Bidirectional Call Relationship Visualization

  • Outgoing Calls: Shows which other functions are called by the current function
  • Incoming Calls: Shows which functions call the current function

Advanced Visualization Effects

  • Smooth Connection Lines: Uses curves to connect nodes, providing a more natural visual experience
  • Node Highlighting: Related nodes and connection lines are highlighted when hovering over a node
  • Frosted Glass Effect: Uses modern UI design for a premium visual experience
  • Responsive Layout: Automatically adjusts node layout, supporting multi-row display

Interactive Features

  • Node Click: Click on a node to navigate to the corresponding code location
  • Hover Tooltips: Hovering over a node displays detailed information, including function name, file path, and line number
  • Zoom Control: Supports zooming in, zooming out, and resetting the view
  • Debug Information: Provides a debug mode to display detailed call hierarchy data

How to Use

  1. Select a Function or Method: In the code editor, place your cursor on the function or method you want to examine
  2. Open Context Menu: Right-click on the selected function or method
  3. Choose Visualization Option: From the context menu, select one of the following options:
    • Visualize Call Hierarchy... - Shows a selection dialog to choose between viewing outgoing or incoming calls
    • Visualize: Functions Called by This - Directly view functions called by the current function
    • Visualize: Functions Calling This - Directly view functions that call the current function
  4. View Visualization: The extension will display a visualization of the call hierarchy in a new editor tab

Visualization Interface Guide

Node Types

  • Root Node: The currently selected function, with a gradient background
  • Child Nodes: Functions that are called (in outgoing mode) or caller functions (in incoming mode)

Connection Lines

  • Arrow Direction:
    • Outgoing Mode: Arrows point from the root node to child nodes, indicating "calls relationship"
    • Incoming Mode: Arrows point from child nodes to the root node, indicating "is called by relationship"

Control Buttons

  • Zoom In: Enlarge the view
  • Zoom Out: Shrink the view
  • Reset: Reset the view to its original size and position
  • Debug: Show/hide the debug information panel

Tips and Tricks

  • Node Interaction: The entire node area is clickable, not just the text part
  • Highlight Relationships: When hovering over a node, only directly related nodes (parent and child nodes) and connection lines are highlighted, not all nodes
  • Multi-row Layout: When there are many child nodes, they will be automatically arranged in multiple rows to maintain good readability
  • File Paths: Hover tooltips show only project-relative paths rather than full local file paths

System Requirements

  • Visual Studio Code 1.60.0 or higher
  • Languages that support call hierarchy (such as JavaScript, TypeScript, Java, C#, Python, etc.)

License

MIT


中文文档

简介

Call Hierarchy Visualizer 是一个 Visual Studio Code 扩展,用于可视化代码中的函数调用关系。它提供了一个直观、美观的图形界面,帮助开发者理解代码的调用结构,提高代码阅读和理解效率。

功能特点

双向调用关系可视化

  • 外出调用: 显示当前函数调用了哪些其他函数
  • 进入调用: 显示哪些函数调用了当前函数

高级可视化效果

  • 平滑连接线: 使用曲线连接节点,提供更自然的视觉体验
  • 节点高亮: 悬停在节点上时,相关节点和连接线会高亮显示
  • 毛玻璃效果: 使用现代UI设计,提供高端视觉体验
  • 响应式布局: 自动调整节点布局,支持多行显示

交互功能

  • 节点点击: 点击节点可跳转到对应的代码位置
  • 悬停提示: 悬停在节点上会显示详细信息,包括函数名称、文件路径和行号
  • 缩放控制: 支持放大、缩小和重置视图
  • 调试信息: 提供调试模式,显示详细的调用层次结构数据

使用方法

  1. 选择函数或方法: 在代码编辑器中,将光标放在您想要查看调用关系的函数或方法上
  2. 打开右键菜单: 右键点击选中的函数或方法
  3. 选择可视化选项: 在右键菜单中选择以下选项之一:
    • Visualize Call Hierarchy... - 显示选择对话框,可选择查看外出调用或进入调用
    • Visualize: Functions Called by This - 直接查看当前函数调用的其他函数
    • Visualize: Functions Calling This - 直接查看调用当前函数的其他函数
  4. 查看可视化: 扩展将在新的编辑器标签页中显示调用层次结构的可视化图表

可视化界面说明

节点类型

  • 根节点: 当前选中的函数,使用渐变色背景
  • 子节点: 被调用的函数(外出调用模式)或调用者函数(进入调用模式)

连接线

  • 箭头方向:
    • 外出调用模式: 箭头从根节点指向子节点,表示"调用关系"
    • 进入调用模式: 箭头从子节点指向根节点,表示"被调用关系"

控制按钮

  • 放大: 放大视图
  • 缩小: 缩小视图
  • 重置: 重置视图到原始大小和位置
  • 调试: 显示/隐藏调试信息面板

提示与技巧

  • 节点交互: 整个节点区域都是可点击的,不仅限于文本部分
  • 高亮关系: 悬停在节点上时,只会高亮直接相关的节点(父节点和子节点)和连接线,而不是所有节点
  • 多行布局: 当子节点数量较多时,会自动分成多行显示,以保持良好的可读性
  • 文件路径: 悬停提示中只显示项目相对路径,而不是完整的本地文件路径

系统要求

  • Visual Studio Code 1.60.0 或更高版本
  • 支持调用层次结构的语言(如 JavaScript, TypeScript, Java, C#, Python 等)

许可证

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft