sharpen the knife not by mistake woodcutters, good tools will let us debug a lot of convenience and fast.
in November 2019, Google Chrome 78 release. Js (which may have been available in earlier versions, but I didn’t)
The
entry is next to the familiar “element selection tool” and “device emulator” in the developer tools:
is also easy to use. Click the button, devtools-node. js will pop up, as shown in the figure below:
can Add connection by Add connection button, and create a new port listening, here I Add localhost:9999
(as shown below). You can also modify and delete existing links.
everything is ready to start debugging. debugger where you need to debug in NodeJs code. Then execute the command node --inspect=port your_script
, for example:
node --inspect=9999 message_list
if we run into an error like , inspector on 127.0.0.1:9229 failed: address already in use
try changing the port number.
all normal will automatically enter debugging mode:
Read More:
- How to solve the problem of Cannot find module’npmlog’ when installing nodejs under Linux
- Error: EPERM: operation not permitted, mkdir ‘D:\nodejs\node_modules\npm\node_cache\_npx‘
- Install and uninstall under Linux system Node.js
- ADB connection error
- Node.js Cannot find module ‘mysql’ ‘express’
- S32ds: error in services launch sequence when debugging with JLINK
- Nodejs exception error: listen eacces 127.0.0.1:8000
- Completely uninstall node and NPM on MAC
- Installing and uninstalling nodejs in Linux
- “NPM err! Error: eperm: operation not permitted” problem solving
- Using NPM to install Remix error in Windows 10
- Node configuration environment variable and global installation of webapck
- You must restart ADB and eclipse
- node.js Server MySQL database connection timeout (error: connect etimeout)
- Adb error: more than one device/emulator error handling
- Failed to connect to remote VM. Connection reused. Connection reused: Connect
- The version number of robot JS running by electron does not match
- Problems in compiling and using node FFI under electron
- E / Art: failed sending reply to debugger: a solution to broken pipe
- Delete and unload node on MAC