如何在windows中设置SLS_DEBUG?

How to set SLS_DEBUG in windows?

我正在使用无服务器框架,并收到以下错误 -

For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

他们在谈论哪个环境?如何设置?
我正在使用 windows 10.

在系统环境变量中设置。

对于 MacOS: 打开终端并输入以下内容:

export SLS_DEBUG=true

对于Windows: 在系统环境变量中设置它。

对于像我这样从一开始就使用 Windows 但仍然不知道

是什么的傻瓜

For Windows: Set it in the System Environment variable.

表示...一图千言...

对于 powershell:

 $Env:SLS_DEBUG='true'

SET export SLS_DEBUG=true in command prompt or set in System environment variable

如果您使用命令提示符,您可以使用:

设置SLS_DEBUG=真

然后你的 sls 命令 eg =

设置SLS_DEBUG=真

sls 部署 --stage=dev