Tools
Diagrams
Create and manage technical diagrams using the integrated Excalidraw whiteboard.
Overview
Section titled “Overview”C# Dev Tools includes Excalidraw integration for creating diagrams, flowcharts, and technical illustrations directly in VS Code.
Diagram Types
Section titled “Diagram Types”Global Diagrams
Section titled “Global Diagrams”Stored in your user profile, available across all workspaces:
- Reusable diagrams
- Personal reference
- Cross-project documentation
- Architecture diagrams
Workspace Diagrams
Section titled “Workspace Diagrams”Stored per workspace under .vscodecsdt/Diagrams at the workspace root:
- Project-specific diagrams
- Team collaboration – check the folder into source control to share with the team
- Context-specific (architecture, flows, etc.)
- Backward compatibility: existing diagrams from the previous global location (
~/.vscode-csharp-dev-tools/diagrams/workspace/) are still readable and shown alongside new ones
Creating Diagrams
Section titled “Creating Diagrams”New Global Diagram
Section titled “New Global Diagram”- Open Solution Explorer
- Expand “Tools” → “Diagrams”
- Click “Create Global Diagram”
- Enter diagram name
- Diagram opens in Excalidraw
New Workspace Diagram
Section titled “New Workspace Diagram”- Open Solution Explorer
- Expand “Tools” → “Diagrams”
- Click “Create Workspace Diagram”
- Enter diagram name
- Diagram opens in editor
Create with an AI Agent
Section titled “Create with an AI Agent”Ask a VS Code chat agent to create an architecture, flow, deployment, class, or infrastructure diagram. The createDiagram language model tool:
- Creates the editable file under
.vscodecsdt/Diagrams - Opens it immediately in the built-in Excalidraw editor
- Updates the open canvas live during later tool calls
- Can merge, replace, or delete elements using stable IDs
- Embeds matching Azure and Tabler SVG icons into the diagram file
- Uses native two-way Excalidraw bindings, so connectors follow blocks when you move them manually
- Expands blocks to fit labels and detects overlaps or obstructed connectors
- Returns a rendered screenshot to supported agents for visual review
After each change, the agent reviews the full rendered diagram for readability, spacing, hierarchy, colors, and connector routing. If an automatic check or the screenshot reveals a problem, it updates the same .excalidraw file with another merge operation. To request later refinements, refer to the existing file so the agent updates the same canvas instead of creating a second diagram.
Excalidraw Features
Section titled “Excalidraw Features”Drawing Tools
Section titled “Drawing Tools”- Shapes: Rectangle, circle, diamond, ellipse
- Lines: Straight, arrows, curves
- Text: Labels and annotations
- Freehand: Hand-drawn elements
Styling
Section titled “Styling”- Colors and fills
- Stroke styles
- Opacity
- Font sizes
- Line types
Organization
Section titled “Organization”- Grouping elements
- Layers
- Alignment tools
- Distribution
- Z-order management
Managing Diagrams
Section titled “Managing Diagrams”Opening Diagrams
Section titled “Opening Diagrams”- Expand “Diagrams” in Tools section
- View global and workspace diagrams
- Click to open
- Edits save automatically
Renaming Diagrams
Section titled “Renaming Diagrams”- Right-click diagram in tree
- Select “Rename”
- Enter new name
- File is renamed
Deleting Diagrams
Section titled “Deleting Diagrams”- Right-click diagram in tree
- Select “Delete”
- Confirm deletion
- File is removed
Exporting Diagrams
Section titled “Exporting Diagrams”Export diagrams in various formats:
- PNG: Raster image
- SVG: Vector graphics
- JSON: Excalidraw format
To export:
- Open diagram
- Use Excalidraw export menu
- Choose format
- Save file
Version Control
Section titled “Version Control”Workspace Diagrams
Section titled “Workspace Diagrams”Workspace diagrams can be version controlled:
- Stored in
.vscodecsdt/Diagramsat the workspace root - JSON format for diffing
- Commit with code changes
- Share with team
Ignoring Diagrams
Section titled “Ignoring Diagrams”Add to .gitignore if needed:
.vscodecsdt/Diagrams/Use Cases
Section titled “Use Cases”Architecture Documentation
Section titled “Architecture Documentation”- System architecture
- Component diagrams
- Deployment diagrams
- Network topology
Flow Charts
Section titled “Flow Charts”- Process flows
- Decision trees
- Algorithm visualization
- Workflow documentation
Class Diagrams
Section titled “Class Diagrams”- Class relationships
- Inheritance hierarchies
- Interface contracts
- Design patterns
Wireframes
Section titled “Wireframes”- UI layouts
- Screen flows
- User journeys
- Mockups
Collaboration
Section titled “Collaboration”Sharing Diagrams
Section titled “Sharing Diagrams”Share diagrams with team:
- Commit workspace diagrams to repo
- Export as PNG/SVG for docs
- Use global diagrams as templates
- Share JSON files directly
Team Standards
Section titled “Team Standards”Establish conventions:
- Naming patterns
- Color schemes
- Symbol meanings
- Diagram types
Tips and Tricks
Section titled “Tips and Tricks”Keyboard Shortcuts
Section titled “Keyboard Shortcuts”Excalidraw supports:
Ctrl+Z: UndoCtrl+Y: RedoCtrl+D: DuplicateCtrl+G: Group- Arrow keys: Move elements
Quick Workflows
Section titled “Quick Workflows”- Double-click to add text
- Hold Shift for straight lines
- Alt+drag to duplicate
- Ctrl+drag for constrained movement
Organization
Section titled “Organization”- Use layers for complex diagrams
- Group related elements
- Name elements for clarity
- Use consistent colors
Best Practices
Section titled “Best Practices”- Keep diagrams focused and simple
- Use clear labels
- Maintain consistent style
- Version control workspace diagrams
- Export for documentation
- Update diagrams with code changes
Troubleshooting
Section titled “Troubleshooting”Diagram Won’t Open
Section titled “Diagram Won’t Open”If diagram doesn’t open:
- Check file exists
- Verify file permissions
- Try creating new diagram
- Check VS Code output for errors
Can’t Save Diagram
Section titled “Can’t Save Diagram”If save fails:
- Check disk space
- Verify write permissions
- Check file isn’t locked
- Try exporting instead
Diagram Corrupted
Section titled “Diagram Corrupted”If diagram appears corrupted:
- Check JSON file syntax
- Restore from version control
- Create new diagram
- Report issue if persistent