是否可以添加可在launch.json
设置中使用的自定义变量,以便在VSCode中进行调试?当前,我发现的唯一方法是将它们添加到我的工作区设置中,并从${config}
predefined variable引用。
我想在launch.json
中定义变量/属性并使用它们。这是一个示例,如果我想将myCustomVar
添加到我的所有URL中,可能会看起来像:
{
"version": "0.2.0",
"myCustomVar": "my_value",
"configurations": [
{
"name": "Page 1",
"type": "chrome",
"request": "launch",
"url": "http://localhost/page1.html?customVar=${myCustomVar}",
"sourceMaps": true,
"webRoot": "${workspaceFolder}/dev"
},
{
"name": "Page 2",
"type": "chrome",
"request": "launch",
"url": "http://localhost/page2.html?customVar=${myCustomVar}",
"sourceMaps": true,
"webRoot": "${workspaceFolder}/dev"
}
}
是否可以添加可在launch.json设置中使用的自定义变量,以便在VSCode中进行调试?目前,我发现的唯一方法是将它们添加到我的工作空间设置中,并参考...
Input variables可能起作用?