Place launch.json file in .vscode/ directory in the root of your CDK application
It assumes the entry point of your CDK app is in
bin/app.ts.Adjust
argsattribute accordingly if you use something else.
Use VSCode debug mode, running the Debug CDK configuration
Tested with CDK versions
1.89.0and1.101.0, so any version between those two should work just fine
if you have nvm installed, include
"runtimeVersion": "12.20.1" in configurations property of launch.json like below:
{
"version": "0.2.0",
"configurations": [
]
}
ref: https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_multi-version-support