-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I have the need to debug some of our Gulp-based builds, and we use gulp-runner to execute them. It seems difficult to debug the downstream gulp build because of the use of child.spawn here:
https://github.com/jonjaques/gulp-runner/blob/master/index.js#L36
I haven't found a way to get node into debug mode when child.spawn is used. I was curious if anyone is aware of a way to do this?
I've experimented with changing gulp-runner to use child_process.fork and debugging will work fine, as long as the parent process isn't also set to debug mode. This is due to a Node.js issue and unfortunately the fix for it hasn't landed yet:
bug: nodejs/node#9435
pull: nodejs/node#5025
I was curious if a PR would be accepted that would add two configuration parameters - perhaps debug=true/false and debugPort=number - which when active would change gulp-runner behavior to use child_process.fork instead?