/typescript:debuggingfrom typescript
Use when JavaScript or TypeScript misbehaves at runtime in Node, a browser page, a worker, a test runner, or a single executable and its cause is unproven, covering js-debug launch and attach routes, child programs, source maps, exception filters, Node's probe mode, and the evidence Node writes
Ships in typescript. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Covers programs V8's inspector serves, debugged under js-debug. Use tool:debugging for the method and session answers, and typescript:testing for suite design.
[REFERENCES]:
Each question takes one route:
| [INDEX] | [QUESTION] | [ROUTE] |
|---|---|---|
| [01] | Value at known lines of a Node script | Probe ([07]) |
| [02] | Script, CLI, or server started for the debug | Launch ([03]) |
| [03] | Node process or single executable running | Attach ([04]) |
| [04] | Failing Vitest test or Playwright spec | references/tests.md |
| [05] | Page or a script it loads | references/browsers.md |
| [06] | Nx plug-in or executor | references/nx.md |
| [07] | Wrong value or defect inside Effect | references/effect.md |
| [08] | Slow, leaking, crashed, or unending process | references/profiles.md |
js-debug's DAP server runs under the project's Node:
dapDebugServer.js sits in folder js-debug/src of js-debug release asset js-debug-dap-<version>.tar.gz--require <js-debug>/bootloader.js --inspect-publish-uid=http in NODE_OPTIONS, which every Node process they start inheritsLaunches take the entry as program and breakpoints in .ts sources:
child <n> rows in start orderchildren: true follows processes the program forks or spawns (test workers, plug-in workers, executors), and worker threads follow without itcwd <project>.ts entries run where node <entry>.ts runs, and other TypeScript runs from its built .js with breakpoints in the .ts sourcesRunning processes attach by pid with wait_seconds 3, answering running with row child 1 once js-debug attached:
child 1 appears run past every breakpointpending until the line first runs--inspect=127.0.0.1:<free-port> and attach by PID or address--inspect-wait=127.0.0.1:<port>, which holds the process until a client attaches, and the attach binds breakpoints before its first linewebsocket <webSocketDebuggerUrl> attaches one target of the port's /json/listpid, or start under NODE_OPTIONS=--inspect=127.0.0.1:<port><node_internals>/<main>, <main> naming main of its build configuration, and no breakpoint binds theredebugger statement rebuilt into them, and probe <main>:<line> reads their valuesjs-debug takes conditions, hit counts, and logpoints, and refuses function breakpoints:
.ts files on launch. js-debug 1.140.1 can evaluate expressions twice if added after the file loadsall and uncaught, none armed by default: exceptions: ["uncaught"] stops on an uncaught throw or rejection, ["all"] on every throwuncaught as Paused on promise rejection inside node:internal/modules/esm, and under all at the throwread scopes lists function, closure, module, and global scopes by refBreakpoints in .ts sources bind by what built the script, and js-debug pauses each script until its map loads, so first lines bind too:
| [INDEX] | [SCRIPT] | [BINDS] |
|---|---|---|
| [01] | .ts Node runs itself | Yes, as type stripping keeps every position |
| [02] | Output with a linked or inline map | Yes, inside node_modules too |
| [03] | Map whose sources name another root | With settings sourceMapPathOverrides {"<map root>/*": "<local root>/*"} |
| [04] | Map without a sourceMappingURL comment | Never, outFiles included |
| [05] | No map | On .js lines alone |
| [06] | Package under a symlinked node_modules | At the path realpath node_modules/<package> prints |
Checks of one script, in order:
tail -c 200 <script> | rg -o 'sourceMappingURL=.*' prints the map, nothing meaning row [04] or [05]jq -c '{sourceRoot, sources: .sources[:3]}' <map> prints paths that resolve from the map's folder, else row [03]Error stacks in program output name .js lines unless the program runs with --enable-source-maps, which binds no breakpoint.
Node releases whose node inspect --help lists --probe read values at lines with no session:
node inspect --probe <file>:<line> --expr '<expression>' --cond '<condition>' --max-hit <n> --json --timeout 5000 -- <script> <argument>
node inspect --probe <file>:<line> --expr '<expression>' --max-hit 1 --json --pid <pid>
<file> matches a suffix of a loaded script's URL and never a source map, so built output takes its .js line--expr follows its own --probe, probes on one line sharing one pause, and an --expr first answers Unexpected --expr before --proberesults hold hit events with result.value, then completed, timeout, or miss with the pending probes that never bound--max-hit ends a launched program at its limit and resumes an attached one, and --pid opens the inspector with SIGUSR1 itself[06], then children: true where the line runs in a forked processeither --process-timeout or --inspect-publish-uid can be used, not both -> --process-timeout in the run's NODE_OPTIONS or arguments refuses every inspector, so the debug run drops itReferenceError: <name> is not defined -> V8 keeps only variables a closure reads, so evaluate takes frame of the declaring functionnode or dapDebugServer.js missing from the project's PATH -> [02]What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bsamiee/rasm --plugin typescript4 skills in this plugin
/codingUse when writing or reviewing TypeScript, covering functional design with Effect, Schema, and algebraic data types/effectUse when calling an Effect module family, covering HttpApi, HTTP clients and routes, RPC, sockets and atoms, SQL, AI, MCP and chat platforms, child processes, workers and CLIs, persistence and durable execution, files, encodings, crypto, and telemetry/testingUse when writing, running, or debugging TypeScript tests, covering Vitest and @effect/vitest, isolation options, type tests, benchmarks, controlled time, in-memory contract clients, service doubles, generated inputs, fixtures, browser and Workers suites, containers, and PlaywrightOther plugins' skills for the same job