Can I get node --inspect to open Chrome automatically

前端 未结 9 1968
孤城傲影
孤城傲影 2020-12-13 03:41

In the new versions of node, node-inspector is built in and can be fired using the command node --inspect index.js. However, this always provides a command line

9条回答
  •  抹茶落季
    2020-12-13 04:06

    In Chrome 60+ there is an item "Open dedicated DevTools for Node" in chrome://inspect/#devices url, (as well as Node.js icon in DevTools while Node is running). The opened inspect window will connect to Node.js as soon as it starts or restarts, so there is no need to open it manually each time.

提交回复
热议问题