Access to debug (profiler) information before redirection in Symfony

笑着哭i 提交于 2019-12-07 15:20:43

问题


After submitting a form I usually redirect a user to another page (other than the form itself).

Therefore I lose the Profile (debug information, like log). I mean after clicking the Debug Toolbar I get information about the request after redirection. But I do know Symfony keeps information about the previous page. I mean it doesn't forget it. Is there a way to access this information? Where is the debug info about the request before redirection?


回答1:


When you open the Profiler, there is a menu on the left and content area on the right. At the top of that right content area you will see View Last 10 or View All, where you can click to open up previous requests.

From there, simply click on the request that submitted the form, which will be the most recent POST request that you see.




回答2:


In config_dev.yml you can change that behaviour setting intercept_redirects to true

web_profiler:
    intercept_redirects: true


来源:https://stackoverflow.com/questions/35264279/access-to-debug-profiler-information-before-redirection-in-symfony

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!