Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>LiveEvalJS - Instant ScratchpadNew to Visual Studio Code? Get it now.
LiveEvalJS - Instant Scratchpad

LiveEvalJS - Instant Scratchpad

santosh singh

|
2 installs
| (0) | Free
A high-performance JavaScript and TypeScript execution engine for VS Code that provides instant code evaluation, runtime feedback, coverage insights, and customizable execution environments.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LiveEvalJS — Real-time JS/TS Evaluation for VS Code

Version License VS Code Marketplace

LiveEvalJS is a production-ready VS Code extension that provides instant real-time feedback for JavaScript and TypeScript code. Write code with // ? markers and get inline results instantly — no console jumping, no REPL switching, just live evaluation in your editor.

Supports JavaScript, TypeScript, JSX, and TSX files.

💡 Think of it as a lighter, faster alternative to Quokka.js with support for advanced features like code coverage tracking, Recursion Tree Visualization, debug expressions, and multiple runtimes.


⚡ Quick Start

  1. Install from VS Code Marketplace (search LiveEvalJS)
  2. Open any .js, .ts, .jsx, or .tsx file
  3. Add // ? marker to any line to evaluate it
  4. Results appear inline instantly with auto-refresh

Example

const x = 42;                           // ? ⇒ 42
const arr = [1, 2, 3, 4, 5];          // ? ⇒ [1, 2, 3, 4, 5]
const sum = arr.reduce((a, b) => a + b, 0);  // ? ⇒ 15

function factorial(n) {
  return n <= 1 ? 1 : n * factorial(n - 1);
}
factorial(6);                           // ? ⇒ 720

🎯 How It Works

LiveEvalJS evaluates your entire file sequentially on every save (with configurable debounce). Variables and functions declared above a // ? marker are fully available in the evaluation context. This is true stateful evaluation, not isolated snippets.

// Full TypeScript support with type annotations
interface User { 
  name: string; 
  age: number; 
}

const user: User = { name: 'Alice', age: 30 };
user.name;                              // ? ⇒ "Alice"

const doubled = [1, 2, 3].map(x => x * 2);
doubled;                                // ? ⇒ [2, 4, 6]

🔍 Evaluation Markers

LiveEvalJS supports multiple marker types for different evaluation needs:

// ? — Value Display

Shows the value of any expression inline. The most common marker.

const x = Math.pow(2, 10);              // ? ⇒ 1024
[1, 2, 3].map(n => n * n);              // ? ⇒ [1, 4, 9]
"hello".toUpperCase();                  // ? ⇒ "HELLO"

/* ? */ — Multi-line Values

Use block comment syntax for expressions that need it:

const config = {
  api: 'https://api.example.com',
  timeout: 5000,
  retry: 3
}; /* ? */
// ⇒ { api: 'https://api.example.com', timeout: 5000, retry: 3 }

// trace — Function Tracing & Recursion Visualizer

Tracks every call to a function, including arguments, return values, and recursion depth.

🌲 New in 0.2.4: Click [▶ Visualize Recursion Tree] in the trace hover to open the Time-Travel Visualizer! Step through recursion call-by-call with a dynamic tree view.

function fib(n) {
  return n <= 1 ? n : fib(n - 1) + fib(n - 2);
} // trace
// ⇒ fib  ×15 calls  ↓5 depth  4ms

// watch — Variable History

Tracks how a variable changes over time or across loop iterations. Includes sparklines for numeric data.

let count = 0;
for (let i = 0; i < 5; i++) {
  count += i; // watch
}
// ⇒ count: 0 → 1 → 3 → 6 → 10  ▁▂▃▄▅

// ?? — Deep Inspection

Provides a detailed breakdown of objects, arrays, and classes, including prototypes and constructor info.

const user = new User("Alice"); // ??
// ⇒ 📦 User { name: "Alice", ... } (2 keys · 1 proto)

🎛️ Commands

Access LiveEvalJS commands via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

Core Commands

Command Binding Description
Evaluate Current File Ctrl+Shift+Enter Run evaluation immediately
Toggle Auto-Evaluation Ctrl+Shift+L Enable/disable live mode
Clear Results — Remove all inline results + history
Create Scratchpad File — Open a pre-filled JavaScript scratchpad
New JavaScript File — Create a blank .js file

Output Commands

Command Description
Show Output Panel Open the LiveEval console output
Show Console Display captured console.log output
Clear Console Clear all console messages
Show Results Panel Open results analysis view
Clear Results History Erase all stored results

Coverage Commands 🔒 PRO

Command Description
Toggle Code Coverage Enable/disable coverage tracking
Show Coverage Report Display coverage metrics and highlights

Debug Commands 🔒 PRO

Command Description
Add Watch Expression Track a variable across evaluations
Toggle Debug Marker Add/remove debug markers on lines
Show Trace Log Display execution trace details

Utility Commands

Command Description
Show Extension Status Display activation status and settings
Show Features & Tiers View available features by license tier
Validate License Check current license tier
Visualize Recursion Open the Time-Travel Recursion Visualizer

⚙️ Configuration & Settings

All settings use the liveeval.* namespace. Update them in VS Code Settings (Ctrl+, / Cmd+,).

Execution Settings

Setting Default Description
liveeval.execution.timeout 5000 Max execution time per evaluation (ms). Prevents runaway code.
liveeval.execution.runtime node Runtime environment: node, browser, or custom
liveeval.execution.customRuntime — Path to custom JavaScript runtime executable
liveeval.execution.maxMemoryMB 128 Maximum memory usage (MB) per evaluation context
liveeval.execution.enableConsoleRedirection true Capture console.log() output to panel
liveeval.execution.enableCoverage true Enable code coverage highlighting (lines executed)
liveeval.execution.debug false Enable verbose debug logging to output panel
liveeval.execution.maxCallDepth 1000 Max call stack depth before recursion guard triggers
liveeval.execution.traceMaxCalls 50 Max individual call records per // trace function
liveeval.execution.watchHistorySize 10 Max historical values shown per // watch marker

Behavior Settings

Setting Default Description
liveeval.behavior.autoEvaluate true Automatically evaluate on file change
liveeval.behavior.evaluationDelay 300 Debounce delay (ms) before evaluation after typing
liveeval.behavior.maxEvaluationsPerFile 200 Rate limit: max evaluations per file (per session)

Display Settings

Setting Default Description
liveeval.display.showTypes false Show value types in inline results (e.g., string, number)
liveeval.display.showExecutionTime false Display execution time for each line
liveeval.display.truncateValues true Truncate long values in inline display
liveeval.display.maxValueLength 100 Max character length for inline values

Output Format

Setting Default Description
liveeval.output.format inline Display mode: inline, panel, or both

Theme & Colors

Setting Default Description
liveeval.theme.resultColor #7a7a7a Color for successful result values
liveeval.theme.errorColor #ff4d4f Color for error messages
liveeval.theme.consoleColor #1890ff Color for console output lines
liveeval.theme.successColor #52c41a Color for success indicators
liveeval.theme.warningColor #faad14 Color for warning indicators
liveeval.theme.coverageHighlight rgba(82,196,26,0.06) Background color for covered code lines
liveeval.display.theme.traceColor #e599f7 Color for // trace markers
liveeval.display.theme.watchColor #ffd43b Color for // watch markers
liveeval.display.theme.pathTakenColor #51cf66 Gutter color for taken branches in coverage
liveeval.display.theme.pathNotTakenColor #868e96 Gutter color for untaken branches in coverage
liveeval.display.theme.inspectColor #74c0fc Color for // ?? inspection markers

Feature Toggles 🎛️

Per-resource settings (can differ per folder/workspace):

Setting Default Description
liveeval.features.evaluation.enabled true Enable live evaluation feature
liveeval.features.console.enabled true Enable console output capture
liveeval.features.results.enabled true Enable results analysis panel
liveeval.features.coverage.enabled false Enable code coverage tracking 🔒 PRO
liveeval.features.coverage.showHighlights true Show coverage highlights in editor 🔒 PRO
liveeval.features.debugging.enabled false Enable advanced debug features 🔒 PRO
liveeval.features.debugging.showWatchExpressions true Show watch expression panel 🔒 PRO

License Settings

Setting Default Description
liveeval.license.tier free Current license tier: free, pro, or enterprise

📝 Language & File Type Support

LiveEvalJS evaluates code in these file types:

  • .js — JavaScript (ES2020+)
  • .ts — TypeScript (all versions)

All features (evaluation, coverage, debugging) work identically across all supported file types.

Console Output

console.log(), console.error(), console.warn() are captured and displayed in the LiveEval Output panel, not the main debug console.


🎓 Examples

Basic Evaluation

const numbers = [1, 2, 3, 4, 5];
const doubled = numbers.map(n => n * 2);    // ? ⇒ [2, 4, 6, 8, 10]
const sum = doubled.reduce((a, b) => a + b); // ? ⇒ 30

Working with Objects

interface Person {
  name: string;
  age: number;
  email?: string;
}

const person: Person = { 
  name: 'Alice', 
  age: 28, 
  email: 'alice@example.com' 
};

person.name;                              // ? ⇒ "Alice"
const {name, age} = person;               // ? ⇒ { name: "Alice", age: 28 }

Error Handling

try {
  throw new Error('Something went wrong');
} catch (e) {
  e.message;                              // ? ⇒ "Something went wrong" 🔴
}

Async & Promises

const promise = Promise.resolve(42);
await promise;                            // ? ⇒ 42

🐛 Troubleshooting

Results not appearing inline

Check:

  1. Is auto-evaluation enabled? (liveeval.behavior.autoEvaluate)
  2. Did you use // ? marker correctly (comment on same line)?
  3. Is the file in a supported format (.js, .ts, .jsx, .tsx)?

Fix: Try manually running Evaluate Current File (Ctrl+Shift+Enter)

Extension not activating

Check:

  1. Open a JavaScript or TypeScript file first
  2. Check the LiveEval output panel for activation logs

Fix: Reload VS Code (Ctrl+Shift+P → Reload Window)

Performance is slow

Causes:

  • evaluationDelay too low (increase to 500-1000ms)
  • maxCallDepth too high (increase means more tracking overhead)
  • Large files with many markers

Fix:

  • Increase liveeval.behavior.evaluationDelay
  • Reduce marker count in large files
  • Check liveeval.execution.debug logs for bottlenecks

Memory growing over time

Cause: Old evaluation contexts not evicted

Fix:

  • Close and reopen the file
  • Restart VS Code
  • Lower maxMemoryMB limit in settings

TypeScript errors shown in results

Note: This is normal. TypeScript type errors are ignored at runtime.

Fix: If you see type errors in the output panel, check your .ts file for actual type issues in your IDE.


  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft