QuickLog
Fast debug logging for JavaScript/TypeScript: select variables or expressions and insert logs under the current line.
All logs inserted by QuickLog are visually highlighted in the editor and tagged with a special marker (default: // ql), allowing for easy identification and bulk removal.

Features & Usage
1. Insert Log (Fast Path)
Inserts a log using the last used type (defaults to console.log).
- Select a variable or place the cursor on a word.
- Press
Ctrl+Shift+L (macOS: Cmd+Shift+L).
2. Pick Log Type
Choose a specific log type (log, warn, error, table, dir, trace, debug).
- Select a variable.
- Press
Ctrl+Alt+L (macOS: Cmd+Alt+L).
- Select the desired type from the dropdown.
3. Code Actions (Quick Fix)
You can also use the native VS Code "Lightbulb" menu:
- Select text.
- Press
Ctrl+. (or Cmd+.).
- Select "QuickLog: console.log(...)" or other variants.
4. Remove All Logs
Instantly delete all log lines in the current file that match the QuickLog marker.
- Command:
QuickLog: Remove all logs in file
5. Toggle Visibility (Dim Logs)
If the logs are distracting, you can visually "dim" them (reduce opacity) without deleting them.
- Command:
QuickLog: Toggle Log Visibility (Dim/Show)
- Shortcut:
Ctrl+Alt+V
6. Cycle Log Type
Quickly switch the stored "last used" log type (e.g., from log to warn to error) without opening the menu.
- Command:
QuickLog: Cycle log type
Examples
Variable Logging
Before:
const isSelected = event.target.checked;
After (with default // ql marker):
const isSelected = event.target.checked;
console.log('IS_SELECTED', event.target.checked); // ql
Expression Logging
QuickLog tries to smartly parse assignments.
Selection: const total = price * qty;
Result: console.log('TOTAL', total); // ql
Multi-cursor Support
Place multiple cursors on different variables and run the insert command. QuickLog will generate log lines for all of them simultaneously.
Configuration
You can customize QuickLog in your VS Code settings.json:
| Setting |
Default |
Description |
quicklog.marker |
"// ql" |
The string appended to the end of the log line. Used to identify logs for highlighting and removal. |
quicklog.defaultLogKind |
"log" |
Default log type (log, warn, error, etc.) used when no history is available. |
quicklog.rememberLastLogKind |
true |
If true, picking a log type (e.g., error) updates the default for the "Fast Path" command. |
Commands List
| Command ID |
Title |
Default Keybinding |
quicklog.insertLastLog |
Insert last used log |
Ctrl+Shift+L / Cmd+Shift+L |
quicklog.pickAndInsertLog |
Pick log type and insert |
Ctrl+Alt+L / Cmd+Alt+L |
quicklog.removeLogs |
Remove all logs in file |
- |
quicklog.toggleVisibility |
Toggle Log Visibility |
Ctrl+Alt+V |
quicklog.cycleLogKind |
Cycle log type |
- |