How to debug Nodejs app running inside Docker container via Google Cloud

前端 未结 5 1078
再見小時候
再見小時候 2021-02-02 10:22

I have found Google provides some guidelines on how to run Nodejs on a custom runtime environment. Everything seems fine and I am managing to start my Nodejs app on local machin

5条回答
  •  无人共我
    2021-02-02 10:51

    As far as I can see, you need to provide the parameter --debug-brk= to node upon startup - this will enable debugging. After that, access the specified port on your docker container. You probably have to expose it or tunnel (using ssh).

    After that, point the Webstorm remote debugger at the specified port, and you should be set.

提交回复
热议问题