Hi all,
Newbie question:
Using XDebug 2.0.3/PHP 5.2.6 here on OS X 10.5.
When debugging as a "PHP Web page" (as opposed to a "PHP Script"), is
there any way to get the script being debugged to generate its output
to the browser immediately? It appears to set some sort of output
buffering occurs.
Take the following piece of code:
<?php
header("content-type: text/html");
print "This is a test<br>\n";
$t = new testme();
$t->doit(2);
print "done<br>\n";
exit(0);
class testme {
public function __construct() {
print "Constructing<br>\n";
error_log("Constructor",0);
}
/**
* Great little function
*
* @param int $id - a lovely number
*/
public function doit($id) {
print "Doing it with id $id...<br>\n";
}
}
?>
If I set a breakpoint at the "public function doit($id) {" line and
hit Debug, the script appears to execute on the server (the results
of the error_log() are written to the log) up until the breakpoint.
However, none of the "print" calls appear to be getting executed
until I restart the process, click "Remote Launch" in the Debug view
and then the "Terminate" button - at which point all the output is
displayed and the process exits (at which point a second browser
window opens for me saying "DEBUG SESSION ENDED".
Is there any way I could configure PDT/XDebug to instruct PHP to
output the results of the print calls immediately, rather than
waiting for the debugging session to end?
Thanks in advance!