diff --git a/docs/cli/run.md b/docs/cli/run.md index ff57c0170..74381aac4 100644 --- a/docs/cli/run.md +++ b/docs/cli/run.md @@ -164,6 +164,16 @@ export default Object.assign(app, { port }); The `--inspect` and `--inspect-brk` [Node.js options] are supported for debugging sessions. +#### Automatically attaching a debugger + +The simplest way to attach a debugger to VS Code is to use its built-in debug terminal. + +1. Hit `⌘ + ⇧ + P` to bring up the Command Palette. +2. Select `Debug: JavaScript Debug Terminal` +3. Run any command within the terminal; for example, `skuba test`, `skuba start` and VS Code will automatically attach to it. + +#### Manually attaching a debugger + Try this out by starting your project with inspector enabled: ```bash @@ -173,8 +183,8 @@ pnpm start:debug Next, attach VS Code's debugger to the running process: 1. Hit `⌘ + ⇧ + P` to bring up the Command Palette. -1. Select `Debug: Attach to Node Process` -1. Select the `node` process that is pointing to `pnpm start:debug` +2. Select `Debug: Attach to Node Process` +3. Select the `node` process that is pointing to `pnpm start:debug` ```shell Pick the node.js process to attach to