[英]Set environment variable in Visual Studio Code debugger on a Mac
I want to use the VSCode debugger and want to set the environment variables before launching the app. 我想使用VSCode调试器,并要在启动应用程序之前设置环境变量。 The configuration in the Launch folder looks something like this. Launch文件夹中的配置如下所示。
{
"name": "Launch on iOS",
"type": "nativescript",
"request": "launch",
"platform": "ios",
"appRoot": "${workspaceRoot}",
"sourceMaps": true,
"watch": true,
"environment": [
{
"BUILD_ENV": "local"
}
]
}
This doesn't seem to work though. 不过,这似乎不起作用。 I am using a Mac. 我正在使用Mac。
Perhaps this works: 也许这可行:
"env": {
"BUILD_ENV": "local"
}
or 要么
"envFile": "${workspaceFolder}/.env",
or 要么
"osx": {
"environment": [
{ "name": "",
"value": ""
}
]
},
See platform-specific properties . 请参阅平台特定的属性 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.