I added the debugger in any line in server.js
Run node --inspect server
Print out:
To start debugging, open the following URL in Chrome:
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/11206dc9-7cf4-4ab3-91bb-813eae521ae7
When I open this chrome-devtools:// connection, it does not pause at the debugger, nor does refreshing. Why is this?
node --inspect --debug-brk server is effective, but I don’t want to open it at the beginning. Breakpoint, what's going on? ?
淡淡烟草味2017-06-29 10:11:34
try node --inspect --debug server
would be fine
--debug-brk and --debug
are slightly different, the first is to stop when the program starts, the second is to stop at the first breakpoint of your own code running