node-inspector

debugging node.js with node-inspector

限于喜欢 提交于 2019-11-26 23:49:54
问题 I'm trying to debug my nodejs app using node-inspector. But Google Chrome doesn't show the code. I'm using the following, Node.js : v0.10.26 Express : 4.0.0 Node Inspector : v0.7.3 Google Chrome version : 34.0.1847.131 This is what I'm doing to start the debugger.. $ node-inspector Node Inspector v0.7.3 Visit http://127.0.0.1:8080/debug?port=5858 to start debugging. In another console, $ node --debug app.js debugger listening on port 5858 $ Then started Google Chrome and went to http://127.0

Using node-inspector with Grunt tasks

梦想的初衷 提交于 2019-11-26 18:45:53
问题 Does someone used node-inspector with Grunt for application debugging? If not, Can you recommend a debugging tool for Grunt based apps? I'm working with nodejs for a server side app and I have Grunt to use separated tasks (this is because users can execute tasks separately). 回答1: To run grunt in debug, you need to pass the grunt script to node explicitly: node-debug $(which grunt) task and put a debugger; line in your task. node-inspector will then open a browser with debugging tools. Edit 28