Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ If false, protractor will give colored output, as it does by default.
Type: `Boolean`
Default value: `false`

If true, grunt will pass 'debug' as second argument to protractor CLI to enable node CLI debugging as described in [Protractor Debugging documentation](https://github.com/angular/protractor/blob/master/docs/debugging.md).
If true, grunt will pass debugger options to protractor CLI to enable node CLI debugging as described in [Protractor Debugging documentation](https://github.com/angular/protractor/blob/master/docs/debugging.md).
For node >= 8 '--inspect' is passed. Otherwise 'debug'.

#### options.args
Type: `Object`
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
"through2": "~2.0.0"
},
"devDependencies": {
"grunt-contrib-jshint": "~0.11.3",
"grunt": "~0.4.1",
"grunt-contrib-clean": "~0.7.0",
"grunt-contrib-jshint": "~0.11.3",
"grunt-contrib-nodeunit": "~0.4.1",
"grunt": "~0.4.1"
"semver": "^5.4.1"
},
"peerDependencies": {
"grunt": ">=0.4.0"
Expand Down
7 changes: 6 additions & 1 deletion tasks/protractor_runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var path = require('path');
var fs = require('fs');
var split = require('split');
var through2 = require('through2');
var semver = require('semver');

module.exports = function(grunt) {

Expand Down Expand Up @@ -59,7 +60,11 @@ module.exports = function(grunt) {
args.push('--no-jasmineNodeOpts.showColors');
}
if (!grunt.util._.isUndefined(opts.debug) && opts.debug === true){
args.splice(1,0,'debug');
if(semver.gte(process.versions.node, '8.0.0')){
args.unshift('--inspect');
}else{
args.splice(1,0,'debug');
}
}

// Iterate over all supported arguments.
Expand Down