如何在 Symfony Response 中包含 Web 调试工具栏? [英] How to include Web Debug Toolbar in Symfony Response?

查看:31
本文介绍了如何在 Symfony Response 中包含 Web 调试工具栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我渲染模板并从控制器返回响应时,页面底部有一个不错的 Web 调试工具栏.

When I render a template and return a Response from a Controller, there is a nice Web Debug Toolbar on the bottom of the page.

当我不使用模板并通过自己创建 Response 对象返回响应时,是否可以使此栏出现?

Is it possible to make this bar appear when I don't use template and return a response by creating a Response object myself?

推荐答案

它应该足以确保包含一个有效的 ...</body>-block在响应 HTML 代码中.如果缺少正文部分,则不会出现调试工具栏.

It should be sufficient to make sure there is a valid <body>...</body>-block contained in the response-HTML-code. if the body-section is missing, then the debug toolbar won't appear.

这篇关于如何在 Symfony Response 中包含 Web 调试工具栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆