Open CeccoCQ opened 5 years ago
Did you figure this out? I didn't have time lately to look into this.
Some quick answers without testing:
launch.json
settings sometimes. Note that healthcheck.js isn't running by the same process that's running that app, so it won't be debuggable by VS Code using the existing launch.json
. It's run by the Dockerfile HEALTHCHECK command which runs a separate node process via docker exec
. To debug that, you'd need to enable --inspect
option in that HEALTHCHECK command, but the exec won't publish the ports, so debugging it would require a more creative solution.Hello,
--inspect-brk
is what you may be looking for as it starts a debugging session before user code is executed, while the current --inspect
in the compose config attaches after the server finishes setting up which is why something like const app = express()
isn't debuggable.restart: true
to launch.json
's debug port config will do what you're looking for
Maybe I'm too newbie with Vscode, but I don't understand at all how can I debug this nodejs app in a total way.
If I would to start the docker container with docker-compose up then try to debug www file, for example, I'm not able to do it. So, I've some questions: