ConsolePulse
Display JavaScript console.log output inline next to your code - no debugging required!
✨ Features
- Real-time execution: Runs your code automatically on save
- Inline console output: See console.log values directly in your editor
- No debugging needed: Works without starting a debug session
- Async/await support: Works with promises, API calls, setTimeout
- Error display: Runtime errors shown inline where they occur
- Support for console.log, console.error, console.warn
- Timeout protection: Prevents infinite loops (30s limit)
- Syntax error detection: Shows clear error messages
- JSON formatting: Pretty prints objects and arrays
🚀 Quick Start
- Install the extension
- Open any JavaScript file
- Add console.log statements
- Save the file (Ctrl+S or Cmd+S)
- See output inline!
Example
// Synchronous code
let x = 5;
console.log("Value:", x); // Value: 5
// Arrays and objects
let arr = [1, 2, 3];
console.log(arr); // [1,2,3]
let obj = { name: "John", age: 30 };
console.log(obj); // {"name":"John","age":30}
// Async/await with API calls
async function fetchData() {
const response = await fetch('https://jsonplaceholder.typicode.com/todos/1');
const data = await response.json();
console.log(data); // Shows API response!
}
fetchData();
// Promises
Promise.resolve("Hello")
.then(msg => {
console.log(msg); // Hello
});
// setTimeout
setTimeout(() => {
console.log("Delayed message"); // Delayed message
}, 1000);
📋 Requirements
System Requirements
- VS Code: Version 1.74.0 or higher
- Node.js: Must be installed and available in PATH
Supported Languages
- JavaScript (.js)
- TypeScript (.ts)
⚙️ Extension Settings
Configure in VS Code settings (Ctrl+,):
{
// Enable/disable the extension
"consolePulse.enabled": true,
// Auto-run on file save
"consolePulse.runOnSave": true,
// Display style: "after" or "hover"
"consolePulse.decorationStyle": "after"
}
Added setting:
{
// Maximum execution time for instrumented code in milliseconds
"consolePulse.timeout": 30000
}
🎮 Commands
Access via Command Palette (Ctrl+Shift+P):
- ConsolePulse: Run File - Manually execute current file
- ConsolePulse: Clear Output - Remove all inline decorations
🔧 How It Works
- Extension instruments your code to track console calls
- Executes code in a background Node.js process
- Captures output with line number information
- Displays results inline as decorations
⚠️ Limitations
- Node.js environment only: Not for browser-specific code (DOM, window, etc.)
- Execution timeout: Code stops after 30 seconds
- Network required: API calls need internet connection
🐛 Troubleshooting
Output not appearing?
- ✅ Check Node.js is installed:
node --version
- ✅ Save the file (Ctrl+S)
- ✅ Check
consolePulse.enabled is true
- ✅ Check file extension is .js or .ts
- ✅ Wait for async operations to complete (up to 30s)
Syntax errors?
- Extension will show error message
- Check your code for syntax issues
- Fix errors and save again
API calls not working?
- Check internet connection
- Verify API endpoint is accessible
- Check for CORS issues (Node.js doesn't have CORS)
- Wait up to 30 seconds for response
Infinite loop?
- Code execution stops after 30 seconds
- Error message will appear
- Fix the loop and save again
📝 License
MIT