-
-
Notifications
You must be signed in to change notification settings - Fork 604
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
Simple stack trace in comments in the head #113
Comments
+1 |
There are a few ways to improve the situation already.
But regardless of all these solutions, your idea is a good one and I've put it on the list. Thanks! |
@denis-sokolov i think you made a typo with the issue number on the list? Regarding this topic: couldn't we just check the http accepts header send in the repsonse to send pretty page html markup only on request which accept html? |
Thanks so much for the tips, @denis-sokolov! I can't remember what the contexts were in which the Preview tab didn't render HTML correctly--I'll note it if I can find it. But the JsonResponseHandler looks perfect. |
@denis-sokolov, FYI: You're right--the JsonResponseHandler was great for in-browser, AJAX, API consumption (just had to set But, seriously, thanks for adding it to the list, and for your tip on the Json handler. |
@staabm, indeed a typo, thanks! @staabm, using Accept html in PrettyPageHandler is an improvement, thanks. But it won't be too effective, as plenty of clients send that they accept html in situations that the original debugging scenario would deem ineffective, such as Ajax requests. @mattstauffer, consider that you can add and remove handler dynamically yourself: if (myClientDetectionLogic()) {
$run->pushHandler(new JsonResponseHandler());
} else {
$run->pushHandler(new PrettyPageHandler());
} I've added the Accept idea to the list! |
I often get Whoops HTML output in a place that doesn't render HTML--the dev tools inspector, iOS inspectors, etc. (usually API-related.)
Is it possible or would it be easy to add a very simple stack track in an HTML comment at the top of the file? Just so anyone who's seeing the HTML non-rendered could still understand the error.
The text was updated successfully, but these errors were encountered: