Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>Live Eval — Inline JavaScript & TypeScriptNew to Visual Studio Code? Get it now.
Live Eval — Inline JavaScript & TypeScript

Live Eval — Inline JavaScript & TypeScript

santosh singh

|
100 installs
| (1) | Free
See JavaScript & TypeScript values inline as you type — a free, no-terminal way to eval, debug, inspect objects, trace recursion, benchmark, and visualize the Event Loop & Promises right inside VS Code. Add // ? to any line.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Live Eval — Inline JavaScript & TypeScript

Version VS Code License

See JavaScript & TypeScript values inline as you type.

Live Eval evaluates your code as you write it and shows the result of any expression right next to it — no terminal, no run button, no REPL, no context switching. It's a free, no-friction way to eval, debug, and inspect JS/TS, with built-in recursion and Event Loop & Promise visualizers you won't find elsewhere.

Why Live Eval?

  • See values inline next to your code with // ?
  • Inspect objects and prototype chains with // ??
  • Visualize recursion as an interactive call tree, DAG, and timeline
  • Visualize the Event Loop & Promises step-by-step in a built-in panel
  • Track branch coverage, variable history, assertions, and performance — without a terminal
  • Works across .js, .ts, top-level await, and multi-file projects

Quick Example

const prices = [12.5, 8.0, 24.99, 5.5];
prices.filter(p => p > 10);   // ? → [12.5, 24.99] • 2 items
prices.reduce((a, b) => a + b, 0); // ? → 50.99

Works with .js and .ts files.

Screenshots

Live Eval shows results inline as you type — no run button, no separate console.

Inline evaluation, markers, and sparklines Inline results for // ?, // assert, // watch, and loop sparklines

Promise & Event Loop Visualizer Step-by-step visualization of the call stack, microtask queue, and Promise states


Get Started in 30 Seconds

  1. Install from the VS Code Marketplace
  2. Open a .js or .ts file
  3. Add // ? to any line — results appear immediately

Tip: Run LiveEval: New JavaScript Scratchpad (JS) or LiveEval: New TypeScript Scratchpad (TS) from the Command Palette to open a pre-loaded example file.


Marker Reference

Markers are plain comments. They don't change how your code runs — they just tell Live Eval what to show.

Marker What it does
// ? Show the value of the expression on this line
// ?? Deep inspection — type, keys, prototype chain
// trace Record every call to this function (args, return, timing)
// watch Track a variable's value across every iteration and re-evaluation
// assert Inline pass/fail test
// path Show which branches were taken and how often
// perf Benchmark this expression (ops/sec, avg time)
// log Show only console.log output inline, not the return value
// count Show how many times the line executed in one evaluation pass
// table Render the value as a formatted table in the hover card

What You Can Do

Visualize recursion

Add // trace to any recursive function, then open LiveEval: Visualize Recursion Tree from the Command Palette:

function fib(n) {
  return n <= 1 ? n : fib(n - 1) + fib(n - 2);
} // trace
fib(8);
// → fib  ×67 calls  ↓8 depth

The interactive visualizer shows every call, argument, return value, depth, and timing. Switch between a call tree, a DAG (collapsed duplicate subtrees), a timeline (calls plotted by entry time), or a minimap overview. Step through calls one at a time, animate playback, and see a memoization estimate showing how many redundant calls could be eliminated.

Visualize the Event Loop & Promises

Open LiveEval: Visualize Promises from the Command Palette while a file with async/await, Promises, or setTimeout is open. The panel shows a step-by-step animation of:

  • Call Stack — synchronous execution frames
  • Web APIs — pending timers and async operations
  • Microtask Queue — resolved .then() callbacks
  • Callback Queue — fired macrotask callbacks (setTimeout, setInterval)
  • Promise states — create → pending → fulfilled/rejected for every Promise.all, Promise.race, Promise.allSettled, Promise.any, and individual promises

Step forward/back through events or press Play to animate at adjustable speed.

Evaluate any expression instantly

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

const user = {
  name: "Alice",
  age: 30,
}; /* ? → {name: "Alice", age: 30} • 2 keys */

console.log() lines are annotated automatically — no marker needed.

Full TypeScript support

Types, interfaces, and generics are stripped at evaluation time. Results are remapped back to the original TypeScript line numbers via source maps, so decorations always land on the right line even when the compiler removes type-only declarations.

interface Point { x: number; y: number; }

const origin: Point = { x: 0, y: 0 }; // ? → {x: 0, y: 0} • 2 keys

function greet(name: string): string {
  return `Hello, ${name}!`;
}
greet("World"); // ? → "Hello, World!"

See loop values as sparklines

When a marked line runs multiple times, all values are shown in sequence with a sparkline:

for (let i = 1; i <= 5; i++) {
  i * i; // ? → 1  4  9  16  25  ▁▂▄▇█
}

Use await at the top level

No wrapper needed. Write async code and see results inline:

const res = await fetch('https://jsonplaceholder.typicode.com/todos/1'); // ?
const todo = await res.json(); // ?

Write inline assertions

Instant feedback without a test runner:

const sum = add(2, 3);
sum === 5;  // assert → ✅ pass
sum === 6;  // assert → ❌ fail · actual: 5

Track branch coverage

Know which paths your code actually takes:

function classify(n) {
  if (n > 0) return "pos";
  else if (n < 0) return "neg";
  else return "zero";
} // path
classify(5); classify(-3);
// → ⬡ 2/3 branches taken

Benchmark expressions

sumSqrt(); // perf
// → ⚡ 1.2M ops/s · avg 0.8µs · 100 runs

Sandbox & Security

Live Eval runs your code in an isolated worker-process sandbox — a separate Node.js vm context in its own OS process, fully isolated from the extension host and other open files. Nothing you evaluate can affect VS Code itself.

What works out of the box:

  • Safe Node.js built-ins: path, crypto, util, url, querystring, events, buffer, stream, os — with or without the node: prefix (require('node:path') works too)
  • Both CommonJS (require/module.exports) and ES module (import/export) syntax — ESM is automatically converted to CommonJS, including dynamic import()
  • Relative imports — and @/… tsconfig path aliases — of your own .ts, .js, and .json files, instrumented for inline results across files (multi-file evaluation)
  • fetch (HTTPS only, 4 s timeout, 512 KB cap — no credentials forwarded)
  • Top-level await, async/await, Promises, timers
  • Full ES2020+ syntax

Module access — one simple setting. Safe read-only builtins (above) and your own local files always work. Everything else — npm packages and powerful builtins like fs, child_process, net, http — is blocked until you add it to liveeval.execution.allowedModules. Listing a module is explicit consent, so you grant exactly what you trust and nothing more:

// .vscode/settings.json
"liveeval.execution.allowedModules": ["lodash", "dayjs", "fs"]

Requiring anything not listed returns a clear error telling you which setting to add it to.

What's intentionally blocked or limited:

  • eval() and new Function() — disabled for safety
  • globalThis, global, process — no access to the host runtime
  • Browser APIs (document, window, localStorage, etc.) — this is a Node.js sandbox, so these are simply undefined (exactly as in real Node). typeof window === 'undefined' is true, so feature-detection code works; actually using window.foo throws ReferenceError: window is not defined.
  • http:// URLs in fetch — HTTPS only
  • import.meta and top-level module-scope await in imported files — not supported

Note: React / JSX / TSX (.jsx, .tsx) is not supported — Live Eval evaluates plain JavaScript and TypeScript only.

Execution limits (all configurable):

Limit Default
Evaluation timeout 5 000 ms
Recursion depth 1 000 calls
Trace records per function 50
Watch history per variable 10 values

Commands

Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

Command Shortcut Description
LiveEval: Run — Evaluate Current File Ctrl+Shift+Enter Evaluate immediately
LiveEval: Toggle Live Auto-Evaluation On/Off Ctrl+Shift+L Enable/disable live mode
LiveEval: Clear Inline Results — Remove all inline decorations
LiveEval: Visualize Recursion Tree — Open the call tree for the last // trace run
LiveEval: Visualize Promises — Open the Event-loop & Promise Visualizer
LiveEval: Show Console Output Panel — Open the captured console output panel
LiveEval: Show Results Panel — Open the results tree view
LiveEval: Show Output Panel — Open the extension log panel
LiveEval: New JavaScript Scratchpad — New JS file pre-loaded with marker examples
LiveEval: New TypeScript Scratchpad — New TS file pre-loaded with typed examples
LiveEval: Add // ? Marker to Selected Lines — Insert a value marker on each selected line
LiveEval: Export Results to Clipboard — Copy all current inline results as text
LiveEval: Copy Line Value to Clipboard — Copy the evaluated value on the current line
LiveEval: Show Extension Status — Display version and feature status

Configuration

Settings are under liveeval.* in VS Code Settings (Ctrl+,):

Setting Default Description
liveeval.execution.timeout 5000 Max evaluation time (ms)
liveeval.execution.maxCallDepth 1000 Recursion guard
liveeval.execution.traceMaxCalls 50 Max call records per // trace
liveeval.execution.watchHistorySize 10 Values retained per // watch
liveeval.behavior.evaluationDelay 300 Debounce after typing (ms)
liveeval.visualization.maxEvents 5000 Max trace events for the visualizer
liveeval.execution.enableConsoleRedirection true Capture console.log to the output panel
liveeval.execution.debug false Print internal diagnostic logs to the output panel
liveeval.execution.maxMemoryMb 256 Memory limit (MB) for the sandbox worker process
liveeval.execution.allowedModules [] Modules evaluated code may load — npm packages or powerful builtins (fs, child_process, …). Safe builtins are always available. Listing a module is explicit consent.
liveeval.behavior.evaluateWithoutMarkers false Show results for every line automatically — no markers needed (Quokka-style)
liveeval.console.maxDepth 6 Object nesting depth for console output inspection

Troubleshooting

Results not appearing — check the status bar shows $(play) LiveEval. If it says LiveEval Disabled, click it or press Ctrl+Shift+L. Make sure the file is a supported language (.js or .ts) and add a // ? marker to a line.

Decorations look stale — run LiveEval: Clear Inline Results.

Slow typing — raise liveeval.behavior.evaluationDelay to 500–1000 ms.

Recursion visualizer is empty — make sure the function actually recurses, place // trace on the closing brace or definition line, and evaluate the file first.

require() not found — the sandbox scopes require to your workspace root. Open the file inside a VS Code workspace folder.

Imports fail in a multi-file project — check that the imported file is part of the workspace and that the relative file path is correct.


Feedback

Found a bug or have a suggestion? Submit feedback — include the code that triggered it, your VS Code version, and OS.


License

Copyright (c) 2026 LiveEvalJS Labs. All rights reserved.

This software is proprietary and confidential. The source code is not open source. You may install and use the extension binary distributed via the VS Code Marketplace for personal or internal business purposes only.

You may not copy, modify, distribute, sublicense, reverse-engineer, or create derivative works from this software without the prior explicit written permission of LiveEvalJS Labs.

See the LICENSE file for the full terms.


Terms & Conditions

By installing or using Live Eval you agree to the following:

1. Permitted use. You may install and use the extension on machines you own or control, solely for your own personal or internal business purposes.

2. Restrictions. You may not redistribute, resell, sublicense, reverse-engineer, decompile, or create derivative works based on this software without explicit written permission from LiveEvalJS Labs.

3. Code execution is your responsibility. Code you evaluate runs on your local machine under your own operating-system user permissions. You are solely responsible for the code you choose to evaluate, including any effects it may have on your system, files, or external services.

4. No warranty. This software is provided "as is", without warranty of any kind, express or implied — including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement.

5. Limitation of liability. LiveEvalJS Labs shall not be liable for any direct, indirect, incidental, special, consequential, or punitive damages arising from the use or inability to use this software, even if advised of the possibility of such damages.

6. No warranty of continuity. The extension may be updated, changed, deprecated, or discontinued at any time without notice.

7. Security. While the sandbox is designed to isolate evaluated code, no sandboxing mechanism is unconditionally secure. Do not evaluate untrusted third-party code. Add modules to liveeval.execution.allowedModules only in workspaces you fully trust.

8. No responsibility for misuse. LiveEvalJS Labs accepts no liability for misuse, including unintended access to external services, leakage of sensitive data, or violations of applicable laws or third-party terms of service.

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