Debugging WordPress themes with Xdebug, real time html output

Just an Idea – I did not test this.

Worth a try would be to play around with your PHP settings:

; Implicit flush tells PHP to tell the output layer to flush itself      
; automatically after every output block. This is equivalent to calling the PHP   
; function flush() after each and every call to print() or echo() and each and 
; every HTML block. Turning this option on has serious performance implications 
; and is generally recommended for debugging purposes only. 
implicit_flush = On

I would also recommend to disable gzip and look for other output_buffering related options in php.ini.

Then you should be able to set break-points in the different rendering stages of your theme.

Leave a Comment