File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
lambda-debugging-sam-typescript Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 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 ],
Original file line number Diff line number Diff 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
76761. 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`
77792. Set a breakpoint in the handler file ` hello-world/app.ts` by clicking in the gutter-margin
78803. 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
80825. Run ` make invoke` to invoke the Lambda function
8183
8284# # Troubleshooting
You can’t perform that action at this time.
0 commit comments