Value Tracer is a VS Code extension that helps you track, manage, and switch between different values in your code. It provides an intuitive way to manage value changes during development and debugging.
Features
📍 Value Tracking
Automatically tracks value changes in your code
Shows value history through CodeLens
Quick switch between historical values
Restore to original values easily
🔄 Quick Actions
Edit values with quick picker
View value history in side panel
Switch to previous values instantly
Restore single or multiple values
Add current value to history manually
⌨️ Keyboard Shortcuts
Alt+Shift+E (Cmd+Shift+E on Mac): Edit value
Alt+Shift+V (Cmd+Shift+V on Mac): Show value history
Alt+Shift+B (Cmd+Shift+B on Mac): Back to previous value
Alt+Shift+R (Cmd+Shift+R on Mac): Restore all values
Alt+Shift+H (Cmd+Shift+H on Mac): Add current value to history
Alt+Shift+Delete (Cmd+Shift+Delete on Mac): Clear current value history
Alt+Delete (Cmd+Delete on Mac): Clean up all history
🖱️ Context Menu
Right-click to access Value Tracer features:
View Value History
Restore to Previous Value
Restore All Values
Installation
Open VS Code
Go to Extensions (Ctrl+Shift+X)
Search for "Value Tracer"
Click Install
Usage
Track Values
Values are tracked when modified through commands or CodeLens
Manual tracking available via Alt+Shift+H or CodeLens
CodeLens indicators appear above tracked values
Edit Values
Click on CodeLens "Edit Value" or use Alt+Shift+E
Select from history or enter new value
View History
Click on CodeLens "Show History" or use Alt+Shift+V
View all previous values with timestamps
Restore Values
Restore single value: Use CodeLens or Alt+Shift+B
Restore all values: Use Alt+Shift+R or context menu
Example Usage
// Before
const primaryColor = '#FF0000';
// After editing with Value Tracer
const primaryColor = '#0000FF'; // CodeLens shows history: #FF0000 → #00FF00 → #0000FF
Extension Settings
This extension contributes the following settings:
value-tracer.autoRestore: Enable/disable automatic value restoration when opening files
value-tracer.historyRetentionDays: Number of days to keep value history (default: 30)