我正在尝试调试使用VSCode上的本地容器映像创建的AWS lambda(python)函数。我不想使用SAM CLI,因为我的目录结构不包含template.yml。在从AWS Lambda的映像运行容器时,是否有办法调试VSCode中的代码?
dbf7pr2w1#
我指的是这个page,它可以提供帮助。将以下代码添加到launch.json中:视窗:
launch.json
{ "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和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" } ] }
1条答案
按热度按时间dbf7pr2w1#
我指的是这个page,它可以提供帮助。
将以下代码添加到
launch.json
中:视窗:
Linux和Mac: