Information Flow Analysis for C# — Understand What Your Code Really Does
SharpFocus brings information-flow analysis to VS Code and JetBrains Rider. Inspired by Flowistry for Rust, it uses program slicing to help developers understand data dependencies and code relationships at a glance.
SharpFocus implements program slicing — a static analysis technique that answers two critical questions about any variable in your code:
- Backward Slice: What code could have influenced this variable?
- Forward Slice: What code could be influenced by this variable?
By combining both directions, SharpFocus creates a focus mode that highlights only the relevant code paths, fading everything else away. Perfect for debugging, refactoring, and code review.
Learn More:
- Part 1: Understanding Code Through Data Flow — Introduction to program slicing
- Part 2: The Analysis Engine — How the dataflow analysis works
- Part 3: Advanced Analysis Techniques — Transfer functions and performance
Click any variable, parameter, or field and see the complete dataflow instantly. Everything else fades away.
VS Code:
JetBrains Rider:
After: Focus mode with CodeVision hints
Normal Mode - Clean, minimalist Flowistry-style interface:
Advanced Mode - Detailed flow indicators with colored relations and gutter icons:
Navigate through your code's dataflow with keyboard shortcuts and visual aids:
- Tree view with hierarchical flow visualization
- CodeLens annotations at each step
- Quick pick menu for flow details
- Keyboard shortcuts:
Ctrl+Alt+N(next) /Ctrl+Alt+P(previous)
Tree View shows all flow locations organized by type:
- Analysis Mode: Focus on click, or manual trigger
- Display Mode: Normal (minimalist) or Advanced (detailed)
- Server Path: Custom language server location
ext install RahulTR.sharpfocusOr download from VS Code Marketplace
- Open Rider → Settings → Plugins
- Search for "SharpFocus"
- Click Install
Or download from JetBrains Marketplace
- Open a C# project
- Click on any variable or parameter
- Watch SharpFocus highlight the complete dataflow
- Use
Ctrl+Alt+N/Ctrl+Alt+Pto navigate through flow locations
That's it! No configuration needed for basic usage.
- .NET 8.0+ SDK
- Node.js 20+ and npm (for VS Code extension)
- JDK 21 (for Rider plugin)
# Language server
dotnet build SharpFocus.sln
# VS Code extension
cd vscode-extension
npm install
npm run package
# Rider plugin
cd rider-plugin
.\gradlew buildPluginSee vscode-extension/README.md and rider-plugin/README.md for detailed instructions.
- ✅ Focus Mode with forward/backward slicing
- ✅ Normal and Advanced display modes
- ✅ VS Code and Rider support
- ✅ Intra-method analysis
- 🔄 Cross-method analysis
- 🔄 Property and field tracking
- 🔄 Async/await support
- 🔄 LINQ query analysis
- 🔄 Performance improvements
Inspired by Flowistry for Rust. Built with Roslyn.
MIT License - see LICENSE file for details.
Contributions welcome! See individual extension/plugin READMEs for development setup.
Made with ❤️ for C# developers
Please ⭐ Star this repo if you find it useful!






