I have been trying to use the node-inspector for debugging in node. However, it only works initially when I start my app (npm start) and then enter (node-debug app.js) in a separate terminal tab.
Once I set breakpoints everywhere and refresh the app in chrome browser, the debugger never stops at the breakpoints. In my browser, I have node-inspector in one tab (http://127.0.0.1:8080/?port=5858) and my app in the other tab (localhost:3000).
I also tried adding "debugger;" to code as seen below and that hasn't worked with node inspector either.
/* GET home page. */
router.get('/', function(req, res, next) {
debugger;
res.render('index', { title: 'Express' });
});
Any ideas would be greatly appreciated!
i have used node inspector before and feel that it is not convenient to use.
i would like to suggest you to use visual studio code instead. debugging code is really easy.
it is opensource tool and available on all platform; mac, linux or windows