Pretty LogA VS Code extension for quickly adding styled console.log statements to your code with distinctive emoji markers. Make your debugging more visual and organized! No more staring into cluttered log output to find variables - use JSON formatting to add proper indentation to your logs. And customize how your console.logs appear. Table of Contents
Quick Start
Features
ExamplesBasic Logging (
|
Setting | Default | Description |
---|---|---|
prettyLog.emoji.prefix |
🧑💻 |
Emoji used at the beginning of logs |
prettyLog.emoji.pointer |
👉 |
Emoji used as pointer before variables |
prettyLog.emoji.end |
👈 🛑 |
Emoji used at the end of log statements |
prettyLog.emoji.error |
❌ ERROR |
Emoji/text used for error logs |
prettyLog.emoji.debug |
🐞 DEBUG |
Emoji/text used for debug logs |
To customize emojis:
Open VS Code Settings:
- Press
Cmd + ,
(Mac) orCtrl + ,
(Windows/Linux) - Or go to Code > Preferences > Settings
- Press
In the search bar, type "Pretty Log > Emoji"
Edit any field to add your preferred emoji or text
Changes apply immediately to new log statements
To reset to default emojis, hover over the setting and click the "Reset Setting" icon (curved arrow).
Configuration Options
You can customize which elements appear in your logs:
Setting | Default | Description |
---|---|---|
prettyLog.includeFileName |
true |
Include file name in the log output |
prettyLog.includeLineNumber |
true |
Include line number in the log output |
prettyLog.includeVariableName |
true |
Include variable name in the log output |
To customize these options:
- Open VS Code Settings (Cmd+, or Ctrl+,)
- Search for "Pretty Log"
- Toggle the options as desired
Customizing Keyboard Shortcuts
Command | Default Shortcut |
---|---|
Insert Basic Log | Alt+/ |
Insert JSON Stringified Log | Alt+' |
Insert Debug Log | Alt+1 |
Insert Error Log | Alt+2 |
To customize these shortcuts:
- Open VS Code Settings
- Go to Keyboard Shortcuts (
Ctrl+K Ctrl+S
orCmd+K Cmd+S
on Mac) - Search for "Pretty Log" to see all available commands
- Click the pencil icon next to any command and set your preferred key combination
Alternatively, edit your keybindings.json
file directly:
{
"key": "ctrl+alt+l",
"command": "prettyLog.insertBasicLog",
"when": "editorTextFocus"
}
Release Notes
See CHANGELOG.md for detailed release notes.