xdebug_start_error_collection()
xdebug_stop_error_collection()
xdebug_get_collected_errors()

<?php
xdebug_start_error_collection
();
?>
<html>
<body>
<div id='main'>
...
</div>
<div id='errors'>
    <?php echo xdebug_get_collected_errors(); ?>
</div>
</html>