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.
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).
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.
You can also use the native VS Code "Lightbulb" menu:
- Select text.
- Press
Ctrl+.(orCmd+.). - Select "QuickLog: console.log(...)" or other variants.
Instantly delete all log lines in the current file that match the QuickLog marker.
- Command:
QuickLog: Remove all logs in file
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
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
Before:
const isSelected = event.target.checked;After (with default // ql marker):
const isSelected = event.target.checked;
console.log('IS_SELECTED', event.target.checked); // qlQuickLog tries to smartly parse assignments.
Selection: const total = price * qty;
Result: console.log('TOTAL', total); // ql
Place multiple cursors on different variables and run the insert command. QuickLog will generate log lines for all of them simultaneously.
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. |
| 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 | - |