问题
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