[@aws-cdk/aws-lambda-nodejs] local debugging
See original GitHub issuehow to debug locally my lambda with @aws-cdk/aws-lambda-nodejs ? with @aws-cdk/aws-lambda I managed to debug successfully , but this is a similiar but diffrent creature because it’s bundle it to a folder something like cdk.staging/asset-bundle-G0UqOf (where index.js and index.map.js are) if some 1 managed to do it - please share you findings (include launch.json)
UPDATE I managed to debug
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to SAM CLI",
"type": "node",
"request": "attach",
"address": "localhost",
"port": 9999,
"remoteRoot": "/var/task",
"localRoot": "${workspaceRoot}/.cdk.staging/asset-bundle-G0UqOf",
"protocol": "inspector",
"stopOnEntry": false
}
]
}
but I need to put a breakpoint inside /.cdk.staging/asset-bundle-G0UqOf/index.js which is HUGE LONG file… not so user friendly
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Step-through debugging Lambda functions locally
To run AWS SAM in debug mode, use commands sam local invoke or sam local start-api with the --debug-port or -d option. For...
Read more >How To Test your AWS Lambda Function Locally with CDK
This walkthrough uses Docker, Sam, and CDK to build and debug our lambda function locally within our IDE. Set breakpoints and analyze your ......
Read more >AWS CDK 101 - SAM local to test and debug lambda function
let us set up local integration testing of the lambda using sam local in our project and see how it helps debug and...
Read more >Debugging lambda locally using cdk not sam - Stack Overflow
4 Answers 4 · Run your AWS CDK app and create a AWS CloudFormation template. cdk synth --no-staging > template.yaml · Find the...
Read more >Run and debug an AWS Lambda locally - 040code
Contents · The problem · Tools · A simple Lambda · Required cloud resources · Testing locally. NodeJs; Serverless framework; AWS SAM ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding the following to NodejsFunctionProps helps here (maps lines in stack traces back to source at least)
following