Skip to content

Commit

Permalink
Document Javascript Debug Terminal (#1540)
Browse files Browse the repository at this point in the history
Co-authored-by: skuba <34733141+seek-oss-ci@users.noreply.github.com>
Co-authored-by: Ryan Ling <ryan@outlook.com.au>
  • Loading branch information
3 people authored Apr 15, 2024
1 parent c06406e commit a4d9b03
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/cli/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a4d9b03

Please sign in to comment.