Debugging gulp from Intellij - IDE changes debug-brk port every time debug is started

When I debug using a Gulp.js configuration Intellij adds --debug-brk parameter to the node invocation, with a port invented by the IDE. For example:

/usr/local/bin/node --debug-brk=49217 --expose_debug_as=v8debug /Users/jamesplant/infospark-client/node_modules/gulp/bin/gulp.js --color --gulpfile /Users/jamesplant/infospark-client/gulpfile.js serve

Debugger listening on port 49217

This port changes every time I invoke debug. When I attempt to set that port by adding --debug-brk=65656 Intellij simply adds another --debug-brk setting and the node invocation fails. 

I'd like to be able to set the port as changing the JetBrains Chrome Add-In debug port (to match the port chosen by the IDE) causes the add-in to become disabled.

1 comment
Comment actions Permalink

JetBrains Chrome Extension port (the one chosen in chrome-extension://hmhgeddbohgjknpmjagkdomcpobmllji/options.html) should not match the port Node.js debugger is listening on (i.e. the one in ` --debug-brk`). It should match the port the IDE opens on start (normally 63342) that is used to connect the Chrome debugger to the IDE.

Changing extension port results in problems starting the client-side debugging:

and extension gets disabled (shown with greyed out icon) because of the connection failure


Please sign in to leave a comment.