【问题标题】:How to debug assemble.io (ideally in Chrome Console)如何调试 assemble.io(最好在 Chrome 控制台中)
【发布时间】:2015-02-27 11:06:16
【问题描述】:

我希望能够捕获和检查所有由 Assemble.io 中的 Handlebars 解析的 Objects。理想情况下,在 Google Chrome 开发者工具中,就像我检查任何其他 JavaScript 一样。有什么想法吗?

【问题讨论】:

  • 好吧,虽然这不是我所说的inspecting,但我还是设法使用grunt --verbose 打印了所有数据。不过,检查员会很好:)

标签: javascript node.js debugging gruntjs assemble


【解决方案1】:

您可以在构建时使用Assemble's logging helpers 将对象转储到控制台。这将在服务器上进行,不会报告给 Chrome 开发工具。

<!-- Dump entire 'this' context -->
{{debug}}

<!-- Log string -->
{{log "hello, logging"}}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-18
    • 2010-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-28
    相关资源
    最近更新 更多