Skip to content
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

Log gets cleared automatically before page renders. #29

Open
hrishabhg opened this issue Apr 15, 2013 · 2 comments
Open

Log gets cleared automatically before page renders. #29

hrishabhg opened this issue Apr 15, 2013 · 2 comments

Comments

@hrishabhg
Copy link

My Chrome Version = 26.0
When I reloads the page, I am able to view the log but it gets cleared as soon as page renders.
When I am doing this:
echo "<script>console.log('Hello from console.')</script>";
It is being shown there. I have called ChromePhp::log after that, it is not getting logged at the same time.

@ccampbell
Copy link
Owner

Sounds like this is because you are trying to set a header after output has started.

See http://stackoverflow.com/questions/9959597/setting-up-chromephp-for-wordpress-using-xampp

@hakre
Copy link

hakre commented Sep 14, 2014

@ccampbell doesn't the logger PHP class catches if headers are already send or not? And isn't there something with the browser extension (e.g. extracting specifically created tags within the HTTP response body instead of parsing headers only) that works for both cases?

@hrishabhg If it's what @ccampbell suggested it is, you can enable PHP output buffering to prevent PHP from sending the headers and beginning of body a little longer. That might already help quickly with a simple configuration setting: http://php.net/manual/en/intro.outcontrol.php

Related issue: #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants