CodePulse is a Visual Studio Code extension designed to prevent hard-to-catch runtime crashes in Python projects. It automatically monitors changes to Python function logic and alerts you when those changes might break dependent functions elsewhere in your codebase.
🛑 The Problem: Hidden Runtime Crashes
Python's dynamic linking often hides errors until the affected code path is executed, leading to unexpected crashes in testing or production.
Consider this common scenario:
file A.pycontains the functionf1()file B.pycallsf1()
If you modify the signature or internal logic of f1() in A.py, causing it to break its contract:
| Status | Warning |
|---|---|
| Python | ❌ NO warning at edit time. |
| VS Code | ❌ NO warning. |
| Error | Appears only at runtime when B.py is executed. |
CodePulse proactively intercepts this potential breakage.
CodePulse acts as your background development guardian, providing proactive alerts to ensure smooth development:
- Logic Change Detection: Uses hashing to precisely detect when a function's core logic has been altered.
- Automatic Dependency Tracing: Automatically builds a dependency graph, tracking which functions rely on the modified code.
- Seamless Alerts: Provides unobtrusive warnings via the VS Code Status Bar.
- Expandable Panel: Click the Status Bar alert to view a panel listing all potentially affected functions that require your review.
- Multi-Folder Support: Easily configure the extension to watch multiple Python source directories in your workspace.
- Runtime Error Prevention: Helps developers preemptively fix hidden runtime errors caused by unexpected dependency changes.
Install CodePulse directly from the Visual Studio Marketplace.
You need to tell CodePulse which folders contain your Python source files:
- Open VS Code Settings (
Ctrl+,orCmd+,). - Search for “CodePulse”.
- Add the root directories containing your Python code (e.g.,
./src,./backend) to thecodePulse.watchFilessetting.
Now just continue your work as usual. CodePulse works in the background:
- When you modify a function, a Status Bar alert will appear if dependent functions are affected.
- Click the status bar alert to open the expandable panel with the full list of files and functions to review.
Please note that this is an early release. We are actively working on expanding its capabilities.
- Python-Only: Only function-level tracking is currently supported.
- Scope: Logic related to Class methods, decorators, and complex inheritance logic is NOT analysed yet (Will be added in future releases).
- Not a Full Analyzer: This extension is a helper tool and does not guarantee catching all complex runtime behaviors.
We welcome contributions, feature requests, and bug reports!
Star the repository to show your support.