Using node-inspector with Grunt tasks

后端 未结 7 1903
悲哀的现实
悲哀的现实 2020-12-04 06:20

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

7条回答
  •  Happy的楠姐
    2020-12-04 06:46

    Great answers here. In 2017, now you can do

    node --inspect --debug-brk $(which grunt) taskName

    Which prints something like.

    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/232652c3-f63c-4b00-8de9-17dfad5db471

    Open that URL in chrome, and you're good to go!

    I'm using Node 7.3.0 and I'm on Mac. You might have to follow some of the advice in other posts to get it going on Windows.

提交回复
热议问题