Debugging protractor arguments in visual studio code

I am debugging protractor solution in Visual Studio code. How can I do to pass the baseUrl parameter in the launch.json file?

This is the protractor.conf.js file.

exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', //baseUrl: 'xxx', ... }; 

This is my launch.json file:

 { "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 } ] } 
+5
source share
2 answers

Try installing the runtime executable:

 "runtimeExecutable": "node_modules/protractor/bin/protractor", "args": ["--baseUrl=https://127.0.0.1"] 
+1
source

I use launch.json by default and change only these two parameters:

 "program": "c:/Users/lee/AppData/Roaming/npm/node_modules/protractor/bin/protractor", "args": ["${workspaceRoot}/protractor.conf.js"], 
+4
source

All Articles