How to debug a Gulp task?

后端 未结 7 1894
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-30 01:12

How do I debug a gulp task defined in my gulpfile.js with a debugger such as the Google Chrome debugger, stepping through the task\'s code line by line?

7条回答
  •  北恋
    北恋 (楼主)
    2021-01-30 01:34

    Version (node v8.11.3, npm 6.2.0, gulp 3.9.1)

    Windows 10 & git bash

    Install Node.js V8 --inspector Manager (NiM) & set to your preference

    Try this:

    node --inspect-brk ./node_modules/gulp/bin/gulp.js --verbose
    

提交回复
热议问题