Node.js Debugging flow

后端 未结 3 458
后悔当初
后悔当初 2020-12-20 00:18

I\'d like to debug node.js like rails. I\'ve tried several ways:

  1. Webstorm debug – in this case I need to click \"rerun debug\" each time after code changed
3条回答
  •  没有蜡笔的小新
    2020-12-20 01:13

    Now with the upgrade works just fine. [23/09/2018]

    For configuration you need to have the Webstorm 2018.2 and follow the steps below:

    and ALSO include the option to "Attach to Node.js/Chrome" [+] as follow:

    To make the debugger restart after every change you would have to enable the [x] Reconnect Automatically option.

    The flow of working with the debug is:

    1. Run your (in my case) Nodemon.
    2. Debug your (in my case) NodemonDebugger
    3. Set the breakpoints and everything else and you are good to go.

    Note: If you are going direct to the debugger instead (and therefore not following this process) one would probably be expecting a termination of the process after changing the code lines.

提交回复
热议问题