1

I managed to install Eclipse with PDT, xDebug with XAMPP and using Chrome as external browser for Eclipse. My problem now is if I set up break points within my PHP code, the debugger stopped as expected. However the browser output will only show result when after all PHP code block has been executed. For example, if I have a php file like this:

<?php 
    echo 'Test Line 1';
    echo 'Test Line 2';
    echo 'Test Line 3';
    echo 'Test Line 4';
    echo 'Test Line 5';
    echo 'Test Line 6';
    echo 'Test Line 7';
?>

I set breakpoints at every line, the debugger will stop at each line but browser will show final results after all code been executed rather than display each output while I am at the breakpoint.

Any suggestions I could set it right?

4

2 に答える 2

0

Your output is buffered. See the PHP Manual for info on Output Buffering Control.

Also, see this answer: PHP flushing output as soon as you call echo

于 2013-03-26T23:57:08.927 に答える
0

Add the ob_get_contents() Eclipse expression, you will see the buffer

于 2013-12-08T07:04:19.283 に答える