【发布时间】:2020-09-18 09:25:28
【问题描述】:
在调试时,我实际上丢失了我的调试工具栏(比如,它不再出现在我的网站上)所以我尝试了各种方法来恢复它:
composer require symfony/profiler-pack
composer require symfony/apache-pack
甚至:
composer remove apache-pack
composer require symfony/apache-pack
但我还是拿不回来。我在互联网上找不到任何可以提供帮助的东西。 谢谢!
编辑:
命令bin/console debug:router _wdt 返回:
| Route Name | _wdt |
| Path | /_wdt/{token} |
| Path Regex | #^/_wdt/(?P<token>[^/]++)$#sD |
| Host | ANY |
| Host Regex | |
| Scheme | ANY |
| Method | ANY |
| Requirements | NO CUSTOM |
| Class | Symfony\Component\Routing\Route |
| Defaults | _controller: web_profiler.controller.profiler::toolbarAction |
| Options | compiler_class: Symfony\Component\Routing\RouteCompiler
【问题讨论】:
-
你在你的 .env.local 中的开发环境中吗?
-
是的,我在开发中。
-
我假设您仍在生成或多或少有效的 html 页面?该栏仅在 html 合理有效时显示。如果发生了其他事情,那么您可能看不到它。否则,“bin/console debug:router”是否显示调试路由?如果您手动尝试其中一些路线会发生什么?
-
是的。
debug:router显示了很多路线。例如,登录是其中之一,如果我继续登录路线,我没有我的分析器栏。 -
我说的是探查器使用的 _wdt 路由。 "bin/console debug:router _wdt" 它会告诉你是否安装并启用了分析器代码。