Information Flow Analysis for C# in JetBrains Rider
SharpFocus is a JetBrains Rider plugin that brings information-flow analysis to C#. Using program slicing techniques, it helps you understand data dependencies and code relationships at a glance.
Click any variable, parameter, or field and see the complete dataflow instantly.
- Normal Mode: Subtle highlighting with faded irrelevant code
- Advanced Mode: Color-coded relations with gutter icons
- Tree view with hierarchical flow visualization
- CodeVision annotations showing flow statistics
- Keyboard shortcuts:
Ctrl+Alt+N(next) /Ctrl+Alt+P(previous) - Navigate between sources, transforms, and sinks
See inline annotations above the focused symbol showing:
- Number of locations that influence it
- Number of locations it influences
- Click to open flow details
- Open Rider
- Go to Settings → Plugins
- Search for "SharpFocus"
- Click Install
- Download the plugin ZIP from Releases
- Open Rider → Settings → Plugins
- Click ⚙️ → Install Plugin from Disk
- Select the downloaded ZIP file
- Open a C# project in Rider
- Click on any variable or parameter (or use
Ctrl+Shift+Alt+F) - Watch SharpFocus highlight the complete dataflow
- Open the SharpFocus Flow tool window (View → Tool Windows)
- Use
Ctrl+Alt+N/Ctrl+Alt+Pto navigate through flow locations
Configure SharpFocus in Settings → Tools → SharpFocus:
-
Analysis Mode:
- FOCUS: Trigger automatically on click (recommended)
- MANUAL: Trigger only via keyboard shortcut
-
Display Mode:
- NORMAL: Minimalist highlighting
- ADVANCED: Color-coded with gutter icons
-
Server Path: Custom language server location (optional)
| Action | Windows/Linux | macOS |
|---|---|---|
| Show Focus Mode | Ctrl+Shift+Alt+F |
Cmd+Shift+Alt+F |
| Clear Focus | Ctrl+Alt+C |
Cmd+Alt+C |
| Navigate Next | Ctrl+Alt+N |
Cmd+Alt+N |
| Navigate Previous | Ctrl+Alt+P |
Cmd+Alt+P |
- Fades out irrelevant code
- Highlights focused symbol in golden
- Clean, minimalist appearance
- Shows CodeVision hints inline
- Golden: Focused symbol (seed)
- Orange: Source (influences the focused symbol)
- Purple: Transform (both influences and is influenced)
- Cyan: Sink (influenced by the focused symbol)
- Gutter icons for quick identification
SharpFocus consists of two components:
- Rider Plugin (this repo): Kotlin-based UI and integration
- Language Server: C# analysis engine using Roslyn
The plugin communicates with a bundled language server that performs the actual dataflow analysis.
- Intra-method analysis only: Cross-method analysis coming in future versions
- C# only: Other .NET languages not yet supported
- Requires .NET 8.0+: Ensure you have .NET SDK installed
- JDK 21
- Gradle 8.13+
- PowerShell (for server bundling)
- .NET SDK 8.0+
# Clone the repository
git clone https://github.com/trrahul/SharpFocus.git
cd SharpFocus/rider-plugin
# Build the plugin (with server bundling)
./gradlew buildPlugin
# Output: build/distributions/SharpFocus-0.1.0.zip# Quick build (skip server bundling)
./gradlew buildPlugin -PskipServerBundle=true
# Run in Rider sandbox
.\run-ide.ps1MIT License - see LICENSE for details.
Rahul TR
- GitHub: @trrahul
- Website: rahultr.dev
