I use the AWS SAM application and SAM template to mimic the API service (API Gateway and Lambda). Lambda is running on Python 3.8.
我使用AWS SAM应用程序和SAM模板来模拟API服务(API Gateway和Lambda)。Lambda运行在Python3.8上。
Recently, I have upgraded to the latest version of the SAM cli. I use the command 'sam local start-api' and debug the code by calling the rest api service with Postman.
最近,我升级到了最新版本的SAM CLI。我使用命令‘Sam local start-api’,并通过使用Postman调用rest API服务来调试代码。
When there are some bugs in the code, it used to print the Python errors in the command prompt but the recent upgrade of the cli does not print out the errors anymore. It just print the line where it stopped but it does not give any errors or exceptions.
当代码中有一些错误时,它过去会在命令提示符中打印Python错误,但最近升级的cli不再打印错误。它只打印停止处的行,但不会给出任何错误或异常。
I tried to run it with debug mode on 'sam local start-api --debug' but this did not help.
我试着用调试模式在‘Sam local start-api--DEBUG’上运行它,但没有帮助。
Is there any change and any workaround to print Python errors when running SAM cli?
在运行SAM CLI时,是否有任何更改和解决办法来打印Python错误?
I tried to run it with debug mode on 'sam local start-api --debug' but this did not help.
我试着用调试模式在‘Sam local start-api--DEBUG’上运行它,但没有帮助。
Is there any change and any workaround to print Python errors when running SAM cli?
在运行SAM CLI时,是否有任何更改和解决办法来打印Python错误?
更多回答
优秀答案推荐
我是一名优秀的程序员,十分优秀!