Remotely debugging my node app that is hosted on AWS

前端 未结 7 570
别那么骄傲
别那么骄傲 2021-01-29 21:10

I would like to connect to my node server running in debug mode on AWS (node --debug app.js) from my development machine, and be able to debug my app remotely.

Two quest

7条回答
  •  情话喂你
    2021-01-29 21:27

    And with the help of tepez's answer, the following worked for me (Node Inspector v0.12.2):

    On my machine:

    ssh -L 8080:127.0.0.1:8080 @ -N
    

    On the remote server:

    node-debug --cli 
    

    And enter the following address in the browser:

    127.0.0.1:8080/?ws=127.0.0.1:8080&port=5858
    

提交回复
热议问题