在 visual studio 代码中设置量角器参数调试
Set protractor arguments debugging in visual studio code
我正在用 visual studio 代码调试量角器解决方案。我如何才能将 baseUrl 作为参数传递到 launch.json 文件中?
这是我的 protractor.conf.js 文件
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
//baseUrl: 'xxx',
...
};
这是我的 launch.json 文件:
{
"version": "0.1.0",
"configurations": [
{
"name": "Launch e2e Tests",
"type": "node",
"program": "node_modules/protractor/lib/cli.js",
"stopOnEntry": false,
"args": ["protractor.conf.js","--baseUrl='pippo'" ],
"cwd": ".",
"runtimeExecutable": null,
"isShellCommand": true,
"runtimeArgs": [],
"env": { },
"sourceMaps": false,
"outDir": null
}
]
}
尝试设置运行时可执行文件:
"runtimeExecutable": "node_modules/protractor/bin/protractor",
"args": ["--baseUrl=https://127.0.0.1"]
我使用默认 launch.json
并仅更改这两个设置:
"program": "c:/Users/lee/AppData/Roaming/npm/node_modules/protractor/bin/protractor",
"args": ["${workspaceRoot}/protractor.conf.js"],
我正在用 visual studio 代码调试量角器解决方案。我如何才能将 baseUrl 作为参数传递到 launch.json 文件中?
这是我的 protractor.conf.js 文件
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
//baseUrl: 'xxx',
...
};
这是我的 launch.json 文件:
{
"version": "0.1.0",
"configurations": [
{
"name": "Launch e2e Tests",
"type": "node",
"program": "node_modules/protractor/lib/cli.js",
"stopOnEntry": false,
"args": ["protractor.conf.js","--baseUrl='pippo'" ],
"cwd": ".",
"runtimeExecutable": null,
"isShellCommand": true,
"runtimeArgs": [],
"env": { },
"sourceMaps": false,
"outDir": null
}
]
}
尝试设置运行时可执行文件:
"runtimeExecutable": "node_modules/protractor/bin/protractor",
"args": ["--baseUrl=https://127.0.0.1"]
我使用默认 launch.json
并仅更改这两个设置:
"program": "c:/Users/lee/AppData/Roaming/npm/node_modules/protractor/bin/protractor",
"args": ["${workspaceRoot}/protractor.conf.js"],