access to the php output buffer(s) in the debugger? |
Site Admin
|
You can invoke corresponding ob_XXX functions in Watch or Immediate and see their return values.
Watch is better if you want it to happen automatically after each step, Immediate is better for one-time checks. |
||||||||||||
_________________ The PHP IDE team |
|
Thanks Dimitri,
I tried ob_get_contents() as a watch and was able to see what it retrieved from the buffer. I think my question was was wrong. What I am after is a way to see each "write" to stdout or nested buffers that would happen due to something outside of php tabs, or an echo, or a ob_end_flush() etc. My case was that I had a line of text appearing in a web page that shouldn't be there and I was having trouble finding what was putting it there. Walking through every line of code was laborious and although I new it would get me there in the end, I couldn't find it for some time. If I could have done a sort of tail on the nested buffers it might have helped. Or maybe there is another better way to track down unintended output? Thanks, Nick |
||||||||||||
|
Site Admin
|
If you want to see each "write", you may want to disable output buffer at all. In this case Output window will be updated with each echo (or any other output function) call.
If you want to get debugger stopped when a particular content appear in the output buffer, set a Global Breakpoint with condition like below: strpos(ob_get_contents(), "my text") !== FALSE |
||||||||||||
_________________ The PHP IDE team |
access to the php output buffer(s) in the debugger? |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by