How to Debug Grunt Mocha Task?

后端 未结 4 1508
名媛妹妹
名媛妹妹 2021-02-08 20:07

I am using WebStorm to run a grunt task. The debugger successfully stops at the breakpoint in the Gruntfile.js file, but not in my task file.

In the Gruntfile.js I regis

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-08 20:35

    To run grunt task in debug, you need to pass the grunt task script to node-inspector:

    node-debug $(Path \AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt) task
    

    Put a debugger; line in your task. node-inspector will then open a browser with debugging tools.

    This link help you how its work grunt-node-inspector

    Example: ChrisWren/grunt-node-inspector

    Source: Stackoverflow Question

提交回复
热议问题