A VS Code extension that captures and logs all DevTools Console output to a persistent, human-readable log file. Perfect for debugging extensions, tracking console messages, and analyzing VS Code's internal behavior.
After installing this extension, you'll see a Welcome screen with a "Create Desktop Shortcut" button:
- Click "Create Desktop Shortcut" in the Welcome view
- Approve the admin privilege prompt (required to place the shortcut on your desktop)
- Use the desktop shortcut to launch VS Code - This launches VS Code with DevTools logging enabled
- View your logs using the command
DevTools Logger: Show DevTools Console Log
โ ๏ธ Important: You must run VS Code through the desktop shortcut for logging to work! The shortcut automatically sets the required environment variables.
- ๐ Human-Readable Timestamps - Automatically converts Chromium timestamps to readable format (
2025-10-22 22:08:46.241) - ๐ Auto-Clear on Reload - Log clears when VS Code reloads (mirrors DevTools Console behavior)
- โก Real-Time Formatting - Timestamps formatted automatically every 500ms
- ๐ฏ Easy Access Commands - Quick commands to view logs and open log folder
- ๐ Silent Launcher - Invisible VBS script to start VS Code with logging enabled
- ๐ Complete Console Capture - Captures all console output, errors, warnings, and info messages
- Download the latest
.vsixfile from Releases - Open VS Code
- Press
Ctrl+Shift+Pand run:Extensions: Install from VSIX... - Select the downloaded
.vsixfile
Search for "VS Code DevTools Logger" in the VS Code Extensions Marketplace
To enable DevTools logging, you need to launch VS Code with the ELECTRON_ENABLE_LOGGING environment variable:
- Close VS Code completely
- Run the launcher script:
- Locate
restart-vscode-silent.vbsin your extension folder - Double-click it (no windows will appear - it runs silently)
- VS Code will restart automatically with logging enabled
- Locate
Once VS Code restarts with the extension active:
- Press
Ctrl+Shift+Pto open Command Palette - Type:
DevTools Logger: Show DevTools Console Log - The formatted log will open in a new editor tab
Or use the command: DevTools Logger: Open Logs Folder to browse all log files
The extension creates two log files in C:\logs\:
| File | Description |
|---|---|
vscode-devtools-raw.log |
Raw Chromium log format (internal use) |
vscode-devtools.log |
Formatted log with human-readable timestamps โ Use this one! |
Before (Raw Chromium format):
[5828:1022/220130.241:INFO:CONSOLE:526] "Extension Host loaded"
After (Human-readable format):
[2025-10-22 22:01:30.241] INFO:CONSOLE:526] "Extension Host loaded"
The easiest way to start VS Code with logging enabled:
' Simply double-click: restart-vscode-silent.vbs
' This script will:
' 1. Close all VS Code instances
' 2. Clear old logs
' 3. Set ELECTRON_ENABLE_LOGGING=1
' 4. Launch VS Code with your workspace
' 5. Start background timestamp formatterIf you prefer manual control:
# Close VS Code
taskkill /F /IM Code.exe
# Set environment variable
$env:ELECTRON_ENABLE_LOGGING = "1"
$env:ELECTRON_LOG_FILE = "C:\logs\vscode-devtools-raw.log"
# Launch VS Code
code "C:\path\to\your\workspace"Create a .bat file:
@echo off
taskkill /F /IM Code.exe >nul 2>&1
timeout /t 2 /nobreak >nul
set ELECTRON_ENABLE_LOGGING=1
set ELECTRON_LOG_FILE=C:\logs\vscode-devtools-raw.log
start "" code "C:\path\to\your\workspace"Open Command Palette (Ctrl+Shift+P) and search for:
| Command | Description |
|---|---|
DevTools Logger: Show DevTools Console Log |
Opens the formatted log file in editor |
DevTools Logger: Open Logs Folder |
Opens C:\logs in File Explorer |
- Electron Logging: VS Code is built on Electron (Chromium). Setting
ELECTRON_ENABLE_LOGGING=1enables Chromium's console logging to a file - Raw Log Capture: Chromium writes logs to
vscode-devtools-raw.logwith its native timestamp format - Real-Time Formatting: The extension runs a background timer (every 500ms) that:
- Reads the raw log file
- Converts timestamps from
MMDD/HHMMSS.mmmtoYYYY-MM-DD HH:MM:SS.mmm - Writes the formatted output to
vscode-devtools.log
- Auto-Clear: On VS Code reload/restart, both log files are cleared automatically
- VS Code: Version 1.70.0 or higher
- Operating System: Windows (VBS launcher is Windows-specific; manual methods work on all platforms)
- Disk Space: Minimal (logs are cleared on reload)
- Ensure you launched VS Code using the VBS script or with
ELECTRON_ENABLE_LOGGING=1 - Check that
C:\logsfolder exists (the extension creates it automatically)
- Verify the extension is installed and enabled
- Reload VS Code window (
Ctrl+RorDeveloper: Reload Window)
- Check Windows file path in the script matches your workspace location
- Run the script as Administrator if needed
The extension uses these default paths:
- Raw Log:
C:\logs\vscode-devtools-raw.log - Formatted Log:
C:\logs\vscode-devtools.log
To change paths, edit:
restart-vscode-silent.vbs(environment variable)extension.js(constants at the top)
Contributions are welcome! Please feel free to submit issues or pull requests.
MIT License - see LICENSE file for details
Ilan Aviv
Enjoy debugging with readable DevTools logs! ๐