I have installed NB 7.1, WAMPP 1.7.7 (with PHP 5.3.8) and XDebug 2.1.4. I can inspect variables on breakpoints, ok. But if exception occurs then Netbeans dont know about this, while browser show xdebug-formatted callstack. NB still thinks "netbeans-xdebug" is "running". So my question is: can Netbeans report a PHP exception?
Regards to @Andy's solution
I prepare this code for testing:
<?php
function exceptionHandler($ex) {
echo 'Uncaught exception: ', $ex->getMessage(), "
"; // BREAKPOINT
}
set_exception_handler('exceptionHandler');
function errorHandler($errno, $errstr, $errfile, $errline) {
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
set_error_handler('errorHandler');
throw new Exception;
phpinfo();
?>
Netbeans stops and report on my breakpoint, so one problem solved. But NB immadietly show alert titled "Socket Exception" with text:
Socket Exception occured
If you have ane Watches, try to remove them and restart debugger. If removing Watches doesn't help or you don't have any Watches, please file an issue and provide the exact steps to reproduce your problem. Please attach the IDE log. Attaching your project would also be very helpful.
I think that PHP terminates when exception occurs, so xdebug must stop and Netbeans loses dubbuging data.