Skip to content

Commit

Permalink
docs: vs code breakpoints closes #73
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed Sep 3, 2024
1 parent d71d9c5 commit 685c976
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 4 additions & 21 deletions www/src/content/docs/docs/live.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,25 +149,8 @@ Note that, the AWS Client VPC service is billed on an hourly basis but it's fair

Since Live runs your functions locally, you can set breakpoints and debug your functions in your favorite IDE.

:::note
We are still working on adding support for [breakpoints](https://github.com/sst/ion/issues/73).
:::
![VS Code Enable Auto Attach](../../../assets/docs/live/vs-code-enable-auto-attach.png)

For VS Code, add the following Launch Configuration to `.vscode/launch.json`.

```json title=".vscode/launch.json"
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug SST Live",
"type": "node",
"request": "launch",
"runtimeArgs": ["dev"],
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**"],
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/sst"
}
]
}
```
For VS Code, you'll need to enable Auto Attach from the Command Palette. Hit `Ctrl+Shift+P` or `Cmd+Shift+P`, type in **Debug: Toggle Auto Attach** and select **Always**.

Now open a new terminal VS Code, run `sst dev`, set a breakpoint in a function, and invoke the function.

0 comments on commit 685c976

Please sign in to comment.