-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Consider creating a debugging component #6828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
👍 I'd also suggest that this component gets handled by the framework in its own event listener (eg. kernel.request with the highest priority) instead of This would also allow some cool features like displaying a raw message if it's an ajax request (instead of a symfony HTML template) for a quick debug with Firebug and co. |
👍 |
@bamarni initializing the exception handler in kernel.request would mean it would quite never be called. Currently, it is only called in 3 cases:
The handling of ajax requests is what you should do in the exception controller, which is the place intended to display error pages in prod (IIRC, the ExceptionHandler is only enabled in debug mode anyway) |
About the ajax rendering I was indeed talking about the ExceptionHandler in debug mode, not production error pages. If the kernel.request event is too late then I can just forget about this feature as the Request object wouldn't be accessible (or maybe relying directly on $_SERVER? it's not really the "symfony" way but it's for debug mode). I've opened another discussion for my second point (#6834). |
This PR was merged into the master branch. Discussion ---------- [Debug] added the component (closes #6828, closes #6834, closes #7330) | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #6828, #6834, #7330 | License | MIT | Doc PR | symfony/symfony-docs#2479 You can use the individual tools, or register them all: ```php use Symfony\Component\Debug\Debug; Debug::enable(); ``` Changes in Symfony SE: symfony/symfony-standard#523 Commits ------- f693128 fixed typos 1ab1146 [Debug] fixed minor bugs daa3a3c [Debug] changed composer to accept more versions e455269 [Debug] ensured that the Debug tools can only be registered once 946bfb2 [Debug] made the exception handler independant of HttpFoundation 2b305c2 added a main Debug class to ease integration 2ff0927 [Debug] added the component (closes #6828, closes #6834, closes #7330)
Just found this out.
Took me few hours to figure out the |
There are a few classes which I think would be beneficial to extract into their own component:
The text was updated successfully, but these errors were encountered: