在 WebStorm 中设置 Node.js 环境变量
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7707329/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Set Node.js environment variables in WebStorm
提问by Bryan Irace
Is there any way to set environment variables when running a Node.js app using JetBrains' official Node plugin for WebStorm (and their other IDEs as well)?
在使用 JetBrains 的 WebStorm 官方 Node 插件(以及它们的其他 IDE)运行 Node.js 应用程序时,有没有办法设置环境变量?
采纳答案by CrazyCoder
No, it's not possible from WebStorm, environment variables should be defined in your system.
不,WebStorm 不可能,环境变量应该在您的系统中定义。
UPDATE: in the new versions it's possible to set environment variables in the Run/Debug configuration.
更新:在新版本中,可以在运行/调试配置中设置环境变量。
回答by xinbenlv
It is actually possible Here is the official doc: http://www.jetbrains.com/webstorm/webhelp/run-debug-configuration-node-js.html
这实际上是可能的这是官方文档:http: //www.jetbrains.com/webstorm/webhelp/run-debug-configuration-node-js.html
Here is my screenshot
这是我的截图

