[英]how to debug node.js application
I am working on a nodejs project. 我正在开发一个nodejs项目。 I am thinking, is it possible to debug nodejs code like the way debug JavaScript in browser.
我在想,是否有可能像调试浏览器中的JavaScript一样调试nodejs代码。 I mean is there any tool or plugin available to debug nodejs.
我的意思是有任何工具或插件可用于调试nodejs。
https://github.com/node-inspector/node-inspector https://github.com/node-inspector/node-inspector
^You can use node-inspector for debugging. ^您可以使用node-inspector进行调试。
1) Start your node process in debug mode, "node --debug-brk=5858 app.js" 1)以调试模式启动节点进程,“node --debug-brk = 5858 app.js”
2) Start node-inspector process with, "nohup node-inspector &" 2)使用“nohup node-inspector&”启动节点检查器进程
3) In your browser, go to: http://127.0.0.1:9001/debug?port=5858 and start debugging. 3)在浏览器中,转到: http : //127.0.0.1 : 9001 / debug? port = 5885并开始调试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.