swagger-node icon indicating copy to clipboard operation
swagger-node copied to clipboard

Support NodeJS 5.8+ debugging via '--inspect'

Open cognivator opened this issue 7 years ago • 3 comments

NodeJS versions 5.8+ have deprecated '--debug' (and '--debug-brk') in favor of a new implementation, '--inspect' (and '--inspect-brk').

Running swagger project start -d with newer NodeJS versions (8+) will throw a warning and fail to enter debug mode.

Ref: https://nodejs.org/dist/latest-v8.x/docs/api/deprecations.html#deprecations_dep0062_node_debug

cognivator avatar Apr 18 '18 22:04 cognivator

If this project is still being maintained, I'm happy to offer a PR for this fix.

cognivator avatar Sep 19 '18 18:09 cognivator

Same problem here, unable to debug only by running npm run debug instead of swaggee project start -d

aharonamir avatar Oct 17 '18 08:10 aharonamir

Found a solution for that , just run: swagger project start -n --inspect-brk=9229 it will send "--inspect-brk=9229" to node and will enable debugging :wink:

aharonamir avatar Oct 17 '18 08:10 aharonamir