I read a blog recently, and I will sort it out for you, for reference only
Sometimes we need to debug the encrypted js code, we may need to modify the js code ourselves, and then debug it on the compiler, but it is more intuitive and convenient to debug it directly on the browser, so this article is to learn how to use it in the browser Nodejs code debugging implemented by the browser
1. Environment construction
- Install the node environment
- Install the pycharm compiler
- Install Google Chrome
- install module
npm install -g node-inspect
2. Configure Js file parameters
3. Fill in --inspect=127.0.0.1:9229
3. Google Chrome opens the laboratory mode
Enter in the address bar: chrome://flags/
4. Open the incognito browser
ctrl+shift+n Press F12 to open developer tools
Five, debug running code
6. Wait for the debug entry to turn green, then click
Seven, look at the effect
For reference only, if you find it useful, you can click three times