Member-only story
Protractor debugging
Using VScode:
Click Debug>Add configuration:
This opens the launch.json, replace program and args with below values:
"program": "<your_path_to_protractor>\\npm\\node_modules\\protractor\\bin\\protractor", "args": ["${workspaceRoot}/confchrome.js"],
Now add break point:
You can add break point by clicking near to the line you want to inspect:
Now execute the debugger by pressing f5:
Using chrome inspect:
just add the keyword debugger to the tests which you want to inspect:
Run below command:
node --inspect-brk <full_Path>npm\node_modules\protractor\bin\protractor <filePath>/confchrome.js --params.url="https://sdsd"
Now open chrome and type chrome://inspect/#devices
Click inspect and click F8 and click run. The exection stops at ‘debugger’ line and now add manual break points ow goto the file using the tabs and add manual break points.