microsoft / generator-docker

Yeoman generator for Docker
Other
346 stars 69 forks source link

Don't stop on the first line of my server code in Node.js when debugging #99

Open SteveLasker opened 8 years ago

SteveLasker commented 8 years ago

yo docker scaffolds out a dockerfile that uses dockerfile.debug with the following entry point

ENTRYPOINT ["/bin/bash", "-c", "if [ -z \"$REMOTE_DEBUGGING\" ]; then nodemon -L --debug; else nodemon -L --debug-brk; fi"]

However, when the developer starts debugging, we stop on the first line of their server.js code By adding "stopOnEntry": false to launch.json, the debugger will no longer stop on the first line, but hit the breakpoint.

NCarlsonMSFT commented 8 years ago

I Tried adding it to my test project; but it still stopped on the first line on initial attach, and every time I changed the file to trigger nodemon, it would again stop on the first line.