【问题标题】:How to debug grunt (gruntfile)?如何调试 grunt(gruntfile)?
【发布时间】:2015-12-01 03:34:37
【问题描述】:

我有一个配置了少量任务的 gruntfile。一些使用功能如:

middleware: (connect, options, defaultMiddleware) =>
                    proxy = require('grunt-connect-proxy/lib/utils').proxyRequest;
                    window.alert proxy
                    return [proxy].concat(defaultMiddleware)

我想使用 alerts 或 console.log 来调试它,但每当我尝试运行 grunt 时,它都会告诉我“未定义警报”、“未定义控制台”。

我还能如何调试它?

【问题讨论】:

    标签: debugging gruntjs gruntfile


    【解决方案1】:

    node-inspector 可以帮助你更好地解决这个问题。 https://www.npmjs.com/package/node-inspector

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-08-02
      • 1970-01-01
      • 2014-11-17
      • 2016-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-22
      相关资源
      最近更新 更多