Repository navigation
Memory Graph VS Code Extension v0.1.0
π Memory Graph VS Code Extension v0.1.0
First official release of the Memory Graph extension for Visual Studio Code!
β¨ Features
Core Functionality
- π Visualize Python Code Selections - Select code and see memory graphs instantly
- π Visualize Complete Files - Execute entire programs and visualize final state
- π₯οΈ Program Output Display - View print statements alongside graphs
- π¨ Interactive Webview Panel - Zoom, refresh, and explore graphs inline in VS Code
- π Auto Environment Detection - Finds Python, memory_graph, and Graphviz automatically
- π Cross-Platform Support - Works on Windows, macOS, and Linux
Educational Focus
Perfect for students learning Python:
- Understand references and mutation
- See shared data between variables
- Debug data structure issues visually
- Learn with complete program execution
π¦ Installation
Download & Install
- Download
memory-graph-0.1.0.vsixfrom the assets below - Open VS Code
- Go to Extensions (Cmd+Shift+X / Ctrl+Shift+X)
- Click β― menu β "Install from VSIX..."
- Select the downloaded .vsix file
Or via Command Line
code --install-extension memory-graph-0.1.0.vsixπ Requirements
Before using the extension, install:
- Python 3.6+
# Check version
python3 --version- memory_graph package
# macOS/Linux
pip3 install memory_graph
# Windows
pip install memory_graph- Graphviz
- macOS:
brew install graphviz - Linux (Ubuntu):
sudo apt-get install graphviz - Windows: Download from graphviz.org
- macOS:
π Quick Start
Method 1: Visualize Complete Files (Recommended for Students)
- Open a Python file
- Right-click anywhere β "Memory Graph: Visualize Current File"
- See program output + memory graph!
Method 2: Visualize Code Selections
- Select Python code
- Right-click β "Memory Graph: Visualize Selection"
- View the memory graph
Example
print("Starting...")
students = ['Alice', 'Bob']
backup = students # Creates reference!
backup.append('Charlie')
print(f"Students: {students}") # ['Alice', 'Bob', 'Charlie']
print(f"Backup: {backup}") # Same list!Run "Visualize Current File" to see:
- Program output showing both lists changed
- Graph showing
studentsandbackuppoint to same list - Understanding: need
.copy()to avoid this!
π Commands
- Memory Graph: Visualize Current File - Execute and visualize entire file
- Memory Graph: Visualize Selection - Visualize selected code
- Memory Graph: Open Visualization Panel - Open the graph panel
- Memory Graph: Check Environment - Verify dependencies
π§ Configuration
Access via VS Code Settings:
memoryGraph.pythonPath- Custom Python interpreter pathmemoryGraph.outputFormat- Graph format (svg/png)
π Documentation
Full documentation: README
π Known Issues
- Large programs (1000+ lines) may take longer to execute
- Complex nested structures may require zoom to see details
π Credits
- Built on memory_graph by Bas Terwijn
- Extension by Akshen Doke
π¬ Feedback & Issues
Found a bug or have a suggestion? Open an issue
Happy visualizing! π¨π