Skip to content

Commit 24219de

Browse files
committed
Update debugging section of docs
1 parent 2f9b04b commit 24219de

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lambda-debugging-sam-typescript/.vscode/launch.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
"request": "attach",
88
"address": "127.0.0.1",
99
"port": 7050,
10-
// Change localRoot to ${workspaceFolder}/hello-world for AWS SAM
11-
"localRoot": "${workspaceFolder}/hello-world/dist",
10+
// Change localRoot to ${workspaceFolder}/hello-world/dist for locally built.
11+
"localRoot": "${workspaceFolder}/hello-world",
1212
"remoteRoot": "/var/task/",
1313
"outFiles": [
14+
// SAM builds:
1415
"${workspaceFolder}/.aws-sam/build/HelloWorldFunction/**",
16+
// Local builds:
1517
"${workspaceFolder}/hello-world/dist/app.js",
1618
"${workspaceFolder}/hello-world/dist/app.js.map"
1719
],

lambda-debugging-sam-typescript/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ We recommend the one-click setup using the AWS Toolkit for VS Code unless your a
7474
### Debugging
7575

7676
1. Open the sample folder in VS Code to auto-detect `.vscode/launch.json`
77+
a. If using SAM, ensure `localRoot` is set to `${workspaceFolder}/hello-world`
78+
b. If using a local build, ensure `localRoot` is set to `${workspaceFolder}/hello-world/dist`
7779
2. Set a breakpoint in the handler file `hello-world/app.ts` by clicking in the gutter-margin
7880
3. Open the **Run and Debug** view in VS Code
79-
4. Run the **TypeScript: Remote Attach** task
81+
4. Run the **Node: Remote Attach** task
8082
5. Run `make invoke` to invoke the Lambda function
8183

8284
## Troubleshooting

0 commit comments

Comments
 (0)