Cannot debug with gulp config (debugger & inspector on same port)

Hello,

I want do debug my gulp config but webstorm start the debugger and the inspector on the same port, and he can't start the inspector ...

log:

gulp

Debugger listening on ws://127.0.0.1:42155/8a0a7c42-d6f1-468e-9f7d-1db9bb894163

[... (gulp tasks)]

Starting inspector on 127.0.0.1:42155 failed: address already in use

Application has crashed!

3 comments

Seems that problem is caused by the way child tasks are spawned. If the spawned process inherits main process arguments, child process is started on the same debug port as the main process, causing EADDRINUSE

Check your Gulp tasks - one of them must be responsible for the issue

0

Thanks for help :)

I don't see any problem in my configuration, the only server in my gulp tasks is my server running on 8000 but he only start after nodemon startup, so it doesn't start in this case :(

detailed log:

/usr/local/bin/node --inspect-brk=32863 /home/mariusvnh/Documents/hobbnb/node_modules/gulp/bin/gulp.js --color --gulpfile /home/mariusvnh/Documents/hobbnb/gulpfile.js
Debugger listening on ws://127.0.0.1:32863/a0799acd-0fdb-4295-91ad-a72e54705abb
For help see https://nodejs.org/en/docs/inspector
Debugger attached.
[13:34:46] Using gulpfile ~/Documents/hobbnb/gulpfile.js
[13:34:46] Starting 'jsAppCopySrc'...
[13:34:46] Starting 'jsLibs'...
[13:34:46] Finished 'jsLibs' after 243 μs
[13:34:46] Starting 'cleanPublic'...
[13:34:46] Finished 'cleanPublic' after 158 ms
[13:34:46] Starting 'css'...
[13:34:46] Starting 'delPublicCss'...
[13:34:46] Finished 'delPublicCss' after 187 μs
[13:34:49] Finished 'css' after 3.07 s
[13:34:49] Starting 'copyBundles'...
[13:34:49] Finished 'copyBundles' after 18 ms
[13:34:50] Finished 'jsAppCopySrc' after 3.62 s
[13:34:50] Starting 'jsCopy'...
[13:34:50] Finished 'jsCopy' after 24 ms
[13:34:50] Starting 'cleanDev'...
[13:34:50] Finished 'cleanDev' after 1.44 ms
[13:34:50] Starting 'build'...
[13:34:50] Finished 'build' after 6.27 ms
[13:34:50] Starting 'watch'...
livereload task
[13:34:50] Finished 'watch' after 333 ms
[13:34:50] Starting 'default'...
[13:34:50] Finished 'default' after 68 ms
[13:34:50] gulp-inject 3 files into index.html.
Starting inspector on 127.0.0.1:32863 failed: address already in use
[13:34:50] [nodemon] 1.17.5
[13:34:50] [nodemon] to restart at any time, enter `rs`
[13:34:50] [nodemon] watching: *.*
[13:34:50] [nodemon] starting `node server.js`
Application has crashed!

nodemon started!
[13:34:50] [nodemon] app crashed - waiting for file changes before starting...
[13:34:50] /home/mariusvnh/Documents/hobbnb/public/index.html reloaded.

0

>I don't see any problem in my configuration

it's not a problem with your configuration, it's likely an issue with either Gulp runner or one of your Gulp plugins...

You can find similar bug reports on the web, see https://github.com/jonjaques/gulp-runner/issues/3, for example

0

Please sign in to leave a comment.