@Dennis Thanks for the reply. Typically to configure the vscode debugger you have some npm scripts in package.json:
// package.json
"scripts": {
"start": "node app.js",
"debug:start": "node --nolazy --inspect-brk=$DEBUG_PORT app.js"
}
Then in your project root create the vscode config:
// .vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "npm run debug:start",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"debug:start"
],
"port": 9229,
"outputCapture": "std"
}
]
}
In vscode the launch config appears in the debug menu and when you select it, it runs the application and connects to the debug port and then you can control execution via breakpoints etc.
But I’m not sure how to configure it when running the app via netlify-lambda. Maybe netlify-lambda needs to pass these values to the node process?