It's been a long time studying Nodejs. Unfortunately has not persisted, thought to learn some. Always wanted to use the Nodejs Express framework with MySQL to develop a small web site, until now still do not implement user registration function. This is not until the end of it. There are willing to help my teacher ~ See my article can give guidance to the juniors will not be grateful ...
No more gossip, summarize the debugs under Chrome Nodejs:
Read a lot of information guide, NODEJS provides such a module node-inspector, first, a sentence to install it:
NPM install-g Node-inspector/g is a global installation
we start Node-inspector to listen to the debug debug port of Nodejs before commissioning
Open the Nodejs command box, preferably run with administrator privileges, enter this sentence:
Node-inspector
The start debugging is OK, the port is listening by default 8080.
Then we start our Nodejs program, with commands--debug or--DEBUG-BRK, like mine:
I started with supervisor, its advantage is to change things without restarting the program, Supervisor automatically help you listen to the program, when needed to start.
For more information click to open the connection you can also use node to launch.
Seeing the above picture shows that we can debug.
Run the Nodejs program, enter the startup address in the browser, and then re-open a window, enter http://localhost:8080/debug?port=5858
Appear:
You can start debugging!
Chrome-based Nodejs debugger usage