Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Debugging?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jacobley-debugging)
---
name: debugging
description: Debugging (source maps, cache, test failures)
---
# Debugging
## Source maps
Compiled output has source maps. Run with `NODE_OPTIONS=--enable-source-maps` to get TypeScript stack traces. The `mocha-unit-test`, `mocha-integration-test` and `vitest-unit-test` targets already set it.
## Running a single test file
In VS Code, use the play button next to the test ([`vscode-tests`](../../../leyman/vscode-tests/README.md)). From a terminal:
Tests are compiled into `dist-test/` and run against `dist/`, so rebuild both first (`nx run <project>:tsc-test`). Then, from the project directory (mocha is a per-project dev dependency, not on `PATH`):
```bash
NODE_OPTIONS=--enable-source-maps ./node_modules/.bin/mocha './dist-test/unit/my.spec.js' --grep "my test name"
```
## Stale results
```bash
nx run <project>:<target> --skipNxCache # bypass local and shared (remote) cache
nx reset # clear this worktree's .nx/ cache and daemon
```
Task outputs are also shared between worktrees through the `nx-cache` sidecar. `nx reset` does not clear that; see the [worktrees skill](../worktrees/SKILL.md).
## Inspecting targets
Some targets (e.g. `go-build`) are inferred by plugins like `@naxodev/gonx` and never appear in `project.json`, and most come from `targetDefaults` in `nx.json`. Use the resolved config:
```bash
nx show project <project> --json | jq '.targets.<target>'
nx show target inputs <project>:<target> # what is hashed for caching
```
## Coverage
HTML reports are written to `.coverage/project/<name>/report/index.html`. Only the project's own tests count toward its coverage (see [`coverage-report.sh`](../../../leyman/nx-plugin/scripts/coverage-report.sh)).
## Command not found
`nx`, `biome`, `eslint` (from `leyman/main/node_modules/.bin`) and `scripts/commands` are added to `PATH` by `remoteEnv` in `.devcontainer/devcontainer.json`, so they are only on `PATH` inside the devcontainer. In another worktree, that `PATH` still points at the worktree the container was opened on.