Skip to content

A VS Code extension that visualizes call hierarchies for now. But possibilities are endless, do check out planned features and how to contribute :)

License

Notifications You must be signed in to change notification settings

Ganjai-Labs/code-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Visualizer ๐Ÿ–ฅ๏ธ๐Ÿ”

Introduction ๐Ÿ‘จโ€๐Ÿซ

Thanks for checking out Code Visualizer! ๐ŸŽ‰ This extension helps developers visualize their code by generating a flowchart that represents the call hierarchy of functions and methods in your codebase. It transforms the often complex structure of code into an easy-to-understand visual format, making it simpler to navigate large projects. ๐Ÿ—บ๏ธ

Features ๐ŸŒŸ

  • Flowchart Generation: ๐Ÿ“Š Right-click on any function or method, and select 'Visualize' to create a visual representation of its call hierarchy.
  • Interactive Visuals: ๐Ÿ–ฑ๏ธ Zoom in, zoom out, and interact with the flowchart to explore different parts of your code.
  • Customizable Views: ๐ŸŽจ Tailor the flowchart to focus on specific function calls, and adjust the layout for better readability.
  • Searchable: ๐Ÿ” Search for any function or method in the flowchart to quickly navigate to it.
  • Multi-Language Support: ๐ŸŒ Currently supports C, C++, Python.
    • At least that's the goal of this project. Contributions are welcome! ๐Ÿค

How It Works ๐Ÿ› ๏ธ

  1. Install the extension from the VS Code Marketplace.
  2. Right-click on any function or method, and select 'Visualize' to create a visual representation of its call hierarchy.
  3. Watch as the extension creates an interactive diagram of function calls ๐ŸŽญ
  4. Click on nodes to explore deeper into the call hierarchy ๐Ÿ•ต๏ธโ€โ™‚๏ธ

Code Visualizer uses VS Code's built-in call hierarchy API, making it language-agnostic and powerful across various programming languages. ๐Ÿ’ช

Features ๐Ÿš€

  • Interactive node-based diagrams ๐Ÿ•ธ๏ธ
  • Direct navigation to function definitions ๐Ÿ”—
  • Multiple connection visualization for repeated function calls ๐Ÿ”„

How to Contribute ๐Ÿค

We're excited to welcome contributors to the Code Visualizer project! Here's how you can get involved:

  1. Fork the repository ๐Ÿด
  2. Clone your fork: https://github.com/Ganjai-Labs/code-visualizer.git ๐Ÿ“ฅ
  3. Create a new branch: git checkout -b your-feature-name ๐ŸŒฟ
  4. Make your changes โœ๏ธ
  5. Run tests: npm test ๐Ÿงช
  6. Commit your changes: git commit -m "Add some feature" ๐Ÿ’พ
  7. Push to the branch: git push origin your-feature-name ๐Ÿš€
  8. Submit a pull request with the description of your changes ๐Ÿ™

Before contributing, please read our Contributing Guidelines and Code of Conduct. ๐Ÿ“š

Features to be Implemented ๐Ÿ”ฎ

We're always looking to improve Code Visualizer. Here are some features we'd love to see:

  1. Detect cycles in the generated diagrams, and highlight them in red ๐Ÿ”ด

  2. Draw multiple connections between nodes when a function is called multiple times ๐Ÿ”„

  3. Export diagrams as images or SVGs. Currently, the generated diargams are html files that are not viewable outside of VS Code. ๐Ÿ“ธ

  4. Integration with version control to show changes in call hierarchy over time ๐Ÿ•ฐ๏ธ

  5. Performance optimizations for large codebases โšก

  6. Enhanced filtering options for complex diagrams ๐Ÿ”

Moon shot ๐ŸŒ™

  • Conditional highlighting of nodes based on certain conditions ๐ŸŽจ
  • Integration with LLMs to provide more context for the generated diagrams ๐Ÿค–

Feel free to tackle any of these or propose your own ideas! ๐Ÿ’ก

Get Started ๐Ÿš€

Ready to dive in? Install Code Visualizer from the VS Code Marketplace and start visualizing your code today! ๐Ÿ˜Š๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป