I'm trying to debug AWS lambda (python) function created using container image locally on VSCode. I don't want to use SAM CLI as my Directory structure don't contain template.yml. Is there a way to debug the code in VSCode while running the container from the image for AWS Lambda?
Asked
Active
Viewed 318 times
1 Answers
0
I refer to this page which can help.
Add the following code to your launch.json
:
Windows:
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${env:USERPROFILE}/.dotnet/tools/dotnet-lambda-test-tool-6.0.exe",
"args": [],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
}
]
}
Linux and Mac:
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${env:HOME}/.dotnet/tools/dotnet-lambda-test-tool-6.0",
"args": [],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
}
]
}

MingJie-MSFT
- 5,569
- 1
- 2
- 13