LiveRun
Runs your TypeScript as you type and shows values, logs, errors and pass/fail right next to your code.

Why
LiveRun is a playground for katas, interview prep and trying out ideas, inside VS Code. It is free and runs locally with the Node you already have. It is inspired by Quokka and RunJS.
Features
Values inline
Each top-level expression, each console.log and each marked line shows its value as ghost text at the end of the line. Values update about half a second after you stop typing. A line hit many times, in a loop for example, shows its last value and a hit count. A runtime error shows in red on the line that threw it.

Pass and fail
If a value is the result of a check()-style assertion, LiveRun marks the line with a green or red dot in the gutter. The status bar says how many checks fail. Hover a failing line to see what you got next to what you wanted, with the first difference marked. Hover any value to see it in full, pretty-printed.

Side panel
A panel beside the editor shows one row per line that has a value, level with its code and scrolling with it. Objects and arrays open as expandable trees, so you can read a large value without cutting it short. Click a row to jump to its line. The panel opens when LiveRun turns on; turn that off with liverun.sidePanel.

Status bar and run modes
The status bar shows the state of the last run: running, ok, N failing, error on line N, stopped after 5 s, or off. Click it for a menu: run now, open the side panel, switch between auto (run as you type) and manual (run only when you ask), or turn LiveRun off for the file. In manual mode, run with Alt+Enter.

Markers
| You write |
What shows |
xs.map((x) => x * 2); |
A top-level expression shows its value. |
console.log(a, b) |
The logged values, anywhere in the file, inside functions too. |
const total = sum(xs); //? |
The value of the line ending in //?, also inside functions. |
users //? $.map(u => u.name) |
The expression after //?, with $ bound to the line's value. |
getUser(/*?*/ id) |
The expression right after /*?*/, mid-line. /*? $ * 2 */ n transforms it. |
const users = [{ name: 'Ana' }, { name: 'Bo' }];
users.length; // 2
users //? $.map((u) => u.name) // ['Ana', 'Bo']
const id = 41;
const next = /*?*/ id + 1; // 42
The pass/fail convention
LiveRun does not ship an assertion library. It reads the text of a value:
- a value that starts with
✅ passes;
- a value shaped
❌ <got> ≠ <want> (two spaces on each side of ≠) fails, and the hover shows <got> against <want>.
Any function that returns those strings works. Here is one you can paste into your project:
export function check<T>(got: T, want: T): string {
const show = (v: unknown) =>
typeof v === 'string' ? `'${v.replace(/\n/g, '\\n')}'` : JSON.stringify(v) ?? String(v);
const g = show(got);
const w = show(want);
return g === w ? `✅ ${g}` : `❌ ${g} ≠ ${w}`;
}
check(add(1, 2), 3); // ✅ 3
check(add(2, 2), 5); // ❌ 4 ≠ 5
Getting started
- Install LiveRun from the Marketplace.
- Pick one of:
run LiveRun: new scratch file for an untitled TypeScript buffer that runs right away;
open a .ts file and run LiveRun: turn on for this file (remembered per workspace);
add globs to your workspace settings so matching files run by themselves:
{ "liverun.include": ["katas/**/*.ts"] }
LiveRun is off by default in every project. LiveRun: turn off for this file wins over a glob.
If the file has a .env next to it, or the workspace root has one, its variables are loaded into the run. Variables already in the environment win.
Settings
| Setting |
Default |
What it does |
liverun.include |
[] |
Globs of TypeScript files LiveRun runs on by itself, absolute or relative to the workspace folder (e.g. **/katas/*.ts). Empty: only files turned on by hand, and scratch files. |
liverun.debounceMs |
400 |
Milliseconds to wait after the last edit before running the file again. |
liverun.nodePath |
"" |
Path to the node binary that runs your files. Empty: on macOS /opt/homebrew/bin/node or /usr/local/bin/node if present, else the node on PATH. |
liverun.sidePanel |
true |
Open the side panel beside the editor when LiveRun turns on. |
liverun.runMode |
"auto" |
auto runs as you type; manual runs only on Run now (Alt+Enter) or from the status bar menu. The menu switches it for the session. |
Commands
| Command |
Keybinding |
What it does |
| LiveRun: turn on/off |
|
Turns LiveRun on or off everywhere. |
| LiveRun: turn on for this file |
|
Runs the current file, remembered per workspace. |
| LiveRun: turn off for this file |
|
Stops running the current file, even if a glob matches it. |
| LiveRun: new scratch file |
|
Opens an untitled TypeScript buffer that runs right away. |
| LiveRun: toggle side panel |
|
Shows or hides the side panel for this session. |
| LiveRun: open side panel |
|
Opens the side panel. |
| LiveRun: run now |
Alt+Enter (Option+Enter on macOS) |
Runs the file now. Works in a file LiveRun is on for. |
| LiveRun: options |
|
The menu the status bar opens. |
How it works
LiveRun adds small probes to a copy of the editor's text and writes it to a temporary file next to yours, so relative imports resolve (a scratch buffer uses a temporary folder). It runs that file with your local Node in a child process and reads the values back from its output. Nothing leaves your machine, the temporary file is removed after each run, and a run that takes longer than 5 seconds is stopped.
Requirements
- Node 22.18 or later, on your PATH or set in
liverun.nodePath. LiveRun relies on Node's built-in TypeScript type stripping.
- Enums, namespaces and parameter properties cannot be stripped; for those LiveRun falls back to transforming the types (with Node's flag where it exists, or the TypeScript compiler).
Limits
- Values show only for top-level expressions,
console.log and marked lines. A plain line inside a function shows nothing unless you mark it.
- One file runs at a time: the active editor.
- Files run in Node, so browser APIs like
document and window are not there.
- There is no debugger: no breakpoints or stepping.
License and issues
MIT. Report bugs and ideas at github.com/alfredoperez/liverun/issues.