Find, highlight, and clean up console statements in seconds.
Color-coded highlighting for console.log, console.warn, console.error, and more.
One-click removal. Framework presets. Custom patterns.
Install in VS Code • Report Issue • GitHub
| Feature | Description | |
|---|---|---|
| 🎨 | Color-Coded Highlights | Each console method gets its own distinct color |
| 🗑️ | One-Click Removal | Remove all highlighted log statements with a single click |
| 📦 | Framework Presets | Built-in support for NestJS, Winston, Pino, Bunyan, Log4js |
| 🔍 | Smart Parsing | Handles multi-line statements, nested parens, template literals |
| ⚙️ | Custom Patterns | Define your own logger patterns with custom colors |
| 🌐 | Multi-Language | JS, TS, JSX, TSX, Vue, and Svelte |
- Open any JavaScript/TypeScript file
- Click the filter icon in the editor title bar (top right)
- Select what you want to highlight from the dropdown
code --install-extension littleboy.log-highlighter-vscode
Or search "Log Highlighter" in the VS Code Extensions sidebar.
git clone https://github.com/LittleBoy9/log-highliter.git
cd log-highlighter
npm install
npm run build
vsce package
code --install-extension log-highlighter-*.vsix| Method | Color | Preview |
|---|---|---|
console.log |
Blue | |
console.warn |
Yellow | |
console.error |
Red | |
console.info |
Cyan | |
console.debug |
Magenta |
| Option | Description |
|---|---|
| Highlight All Console | Highlights all console.log/warn/error/info/debug |
| console.log / warn / error / info / debug | Highlight a specific method only |
| Highlight All Custom | Highlight all enabled presets and custom patterns |
| Manage Presets | Enable/disable framework presets |
| Remove Highlighted | Delete highlighted statements from code |
| Clear Highlights | Remove highlights without deleting code |
Add to your settings.json:
Or use the menu: Filter icon → Manage Presets to toggle them interactively.
{
"logHighlighter.customPatterns": [
{
"name": "My Logger",
"pattern": "myLogger.log",
"color": "#ff6b6b"
},
{
"name": "Debug Print",
"pattern": "debugPrint",
"color": "#4ecdc4"
}
]
}Each custom pattern requires:
name— Display name shown in the menupattern— Text to match (e.g.,myLogger.info)color— Hex color for highlighting (e.g.,#ff6b6b)
| Language | Extensions |
|---|---|
| JavaScript | .js, .mjs, .cjs |
| TypeScript | .ts, .mts, .cts |
| React | .jsx, .tsx |
| Vue | .vue |
| Svelte | .svelte |
All commands available via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command | Description |
|---|---|
Log Highlighter: Show Menu |
Open the main menu |
Log Highlighter: Highlight All Console Statements |
Highlight all console methods |
Log Highlighter: Highlight console.log |
Highlight console.log only |
Log Highlighter: Highlight console.warn |
Highlight console.warn only |
Log Highlighter: Highlight console.error |
Highlight console.error only |
Log Highlighter: Highlight console.info |
Highlight console.info only |
Log Highlighter: Highlight console.debug |
Highlight console.debug only |
Log Highlighter: Highlight Custom Patterns |
Highlight all custom patterns |
Log Highlighter: Manage Framework Presets |
Open preset manager |
Log Highlighter: Remove All Highlighted Statements |
Delete highlighted code |
Log Highlighter: Clear All Highlights |
Remove highlights only |
Multi-line statements
console.log(
"Hello",
{ data: value },
someFunction()
);Nested parentheses
console.log(calculate(a, b), process(x, y));Template literals
console.log(`Value: ${getValue()}`);Multiple statements on one line
console.log(a); console.warn(b);Chained method calls
console.log(obj.method().property);- Node.js 18+
- npm or yarn
npm install # Install dependencies
npm run build # Build
npm run watch # Watch mode
vsce package # Package as .vsixlog-highlighter/
├── src/
│ ├── extension.ts # Main entry point
│ ├── commands.ts # Command handlers
│ ├── consoleParser.ts # Multi-line parser
│ ├── decorator.ts # Decoration manager
│ └── types.ts # Type definitions
├── package.json # Extension manifest
├── tsconfig.json # TypeScript config
└── esbuild.js # Build script
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License — see LICENSE for details.
Built by Sounak Das
{ "logHighlighter.enabledPresets": ["nestjs", "winston", "pino"] }