In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what debugging tools nodejs uses, the editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Debug node tools: 1, node-inspect, support "long/async" stack tracking and other advanced features, and Chrome can be seamlessly integrated; 2, Node Inspector, based on Chrome to provide visual debugging interface; 3, Visual Studio Code.
This tutorial operating environment: windows7 system, nodejs version 12.19.0, DELL G3 computer.
Three tools for debugging nodejs quickly
1. Built-in node-inspect
This is a debugging tool developed by the official team. It supports advanced features such as long/async stack trace, and can be seamlessly integrated with Chrome. The startup steps are as follows:
1. Execute the node-inspect command to start debugging
2. Open Chrome and enter chrome://inspect in the address bar
3. Select the JS to be debugged
The example is as follows. For more information, please see the official instructions:
# first install node-inspectnpm install-- global node-inspect# to start debugging monitoring node-inspect App.js# or debug remote JS, such as # node-inspect:
Disadvantages:
1. Slow
2. Very slow
3. To make matters worse, node-inspect opens as a pop-up window, while macOS just does not allow pop-up windows, so the result is very tragic and can not be used at all.
2. Node Inspector + Chrome
Node Inspector is a very early debugging tool, which provides a visual debugging interface based on Chrome. It is easy to operate and easy to use, as follows:
# install debugger npm install-g node-inspector# listening debug service node-inspector-p 800 launch debugger node--debug-brk App.js
Finally, open http://localhost:8000 to debug. The screenshot is as follows:
3. Visual Studio Code
This is the biggest dark horse, at first glance I thought it was Microsoft's blockbuster product, but the style is really very similar, simple, efficient, powerful, debugging is directly built in IDE, directly start, almost do not need any instructions, everyone will, quickly download and use it, see the following figure.
This is the end of this article on "which debugging tools are used by nodejs". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 279
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.