VarLens is a powerful Visual Studio Code extension that transforms your debugging experience by providing variable inspection and persistent state tracking across debugging sessions.
Watch VarLens in action:
See how to share debug states with your team:
- Hover Intelligence: Simply hover over any variable to instantly see its value
- Context-Aware: Understands variable scope and maintains accurate values across different code blocks
- Rich Visualization: View complex objects and arrays in a formatted JSON structure
- Complete Parameter Tracking: Capture and inspect function parameters across all scopes
- Interactive JSON Viewer: Click the π icon to open a dedicated panel with a full-featured JSON editor
- Side-by-Side View: Inspect variables in a separate panel while keeping your code in view
- Tree Navigation: Easily explore nested objects and arrays with collapsible tree view
- Persistent State: Variables values are cached and preserved across debugging sessions
- Scope Recognition: Maintains variable values with respect to their scope chains
- Automatic Tracking: No configuration needed - just debug as usual!
- Export Debug States: Save your debug session data to share with team members
- Import Debug States: Load debug states from other developers
- Cross-Project Support: Use debug data across different projects
- Install the extension from VS Code Marketplace
- Start a debug session in your JavaScript/TypeScript project
- Add breakpoints where you want to capture variable states
- Once the debug session ends, variable values are automatically cached
- Hover over variables to see their values, even after the debug session
function calculateTotal(items, taxRate = 0.1) { // Both parameters are now tracked!
const total = items.reduce((sum, item) => sum + item.price, 0);
const tax = total * taxRate; // Hover over 'total', 'tax', or 'taxRate' to see values!
return total + tax;
}
- JavaScript
- TypeScript
-
Debugging Complex Objects
- Hover over variables to quickly peek at values
- Use the inspector for detailed exploration of large objects
-
State Tracking
- Track variable values across different function calls
- Understand how values change throughout your code
-
Code Review
- Review code with actual runtime values
- Understand variable states without running the debugger
- Visual Studio Code version 1.96.0 or higher
- Node.js debugging support enabled
- Variable values are cached in a
.varlens
file in your workspace - Cache is automatically cleaned up when needed
- Supports both simple and complex data types
We welcome contributions! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
- GitHub Issues: Report Issues
- Email: ubaidmanzoor12@gmail.com
Proprietary License
Made with β€οΈ by Ubaid Manzoor