Rut Console Log 🚀
A lightning-fast, intelligent JavaScript, TypeScript, React, Next.js, JSX, and TSX debugging extension for Visual Studio Code. Faster and smarter than Turbo Console Log.
✨ Features
- 🎯 AST-Powered Symbol Extraction: Automatically detects variables, expressions, property access (
response.data.user), and React patterns (useState, useRef, props).
- ⚡ 10+ Instant Logging Commands:
console.log("Showing Log for -> user > at 37 line > ", user)
- Object Shorthand
{ user }
- JSON Pretty Print
console.log(JSON.stringify(user, null, 2))
console.table(users)
console.dir(user, { depth: null })
debugger;
console.time("Label") / console.timeEnd("Label")
console.count("functionName")
console.trace("Reached")
- Smart Function Scope logging
console.log("Showing Log for -> [fetchUsers] > at 12 line > ")
- 🧹 Precise Log Removal: Remove only logs generated by Rut Console Log using marker comments (
// Rut-console-log) without deleting your manual code logs.
- 🔄 Toggle Log: Quick shortcut to toggle logs on and off.
- ⌨️ Multi-Cursor & Keyboard Shortcuts: Instant productivity with customizable shortcuts.
⌨️ Keyboard Shortcuts & Commands
| Command |
Shortcut (Windows/Linux) |
Shortcut (macOS) |
Action |
| Rut Console: Insert Log |
Ctrl+Shift+L |
Cmd+Shift+L |
Logs selected variable or expression under cursor |
| Rut Console: Object Log |
Ctrl+Shift+Alt+L |
Cmd+Shift+Alt+L |
Logs variable as object shorthand { user } |
| Rut Console: JSON Pretty Print |
Ctrl+Shift+Alt+J |
Cmd+Shift+Alt+J |
Formats object as pretty JSON (JSON.stringify) |
| Rut Console: Insert Debugger |
Ctrl+Shift+Alt+D |
Cmd+Shift+Alt+D |
Inserts debugger; on next line |
| Rut Console: Console Table |
Ctrl+Shift+Alt+T |
Cmd+Shift+Alt+T |
Generates console.table(expression) |
| Rut Console: Remove Logs |
Ctrl+Shift+Alt+R |
Cmd+Shift+Alt+R |
Removes all Rut Console Log statements in document |
| Rut Console: Console Dir |
Command Palette |
Command Palette |
Generates console.dir(user, { depth: null }) |
| Rut Console: Console Time |
Command Palette |
Command Palette |
Wraps selection or prompts for console.time |
| Rut Console: Console Count |
Command Palette |
Command Palette |
Inserts console.count("functionName") |
| Rut Console: Console Trace |
Command Palette |
Command Palette |
Inserts console.trace("Reached") |
| Rut Console: Log Smart Function |
Command Palette |
Command Palette |
Logs current enclosing function scope [fetchUsers] |
| Rut Console: Toggle Log |
Command Palette |
Command Palette |
Removes existing log or inserts new log |
💡 How to Log JSON in VS Code
Method 1: Using Keyboard Shortcut (Fastest)
- Select variable (or place your cursor on the variable e.g.,
user or response.data).
- Press
Ctrl+Shift+Alt+J (Mac: Cmd+Shift+Alt+J).
- It automatically inserts:
console.log(JSON.stringify(user, null, 2)); // Rut-console-log
Method 2: Using Command Palette
- Press
Ctrl+Shift+P (Mac: Cmd+Shift+P).
- Type
Rut Console: JSON Pretty Print and press Enter.
⚙️ Configuration Settings
Customize Rut Console Log via VS Code Settings (rutConsoleLog.*):
{
"rutConsoleLog.enableColors": false,
"rutConsoleLog.primaryColor": "#00C853",
"rutConsoleLog.enableFileName": false,
"rutConsoleLog.enableLineNumber": true,
"rutConsoleLog.enableTimestamp": false,
"rutConsoleLog.defaultQuoteStyle": "double",
"rutConsoleLog.addSemicolon": true,
"rutConsoleLog.logMarker": "Rut-console-log",
"rutConsoleLog.insertBelow": true
}
🧪 Installation
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X / Cmd+Shift+X)
- Click
... -> Install from VSIX...
- Select
rut-console-log-1.0.0.vsix
📜 License
Distributed under the MIT License.