Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7898817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:32:18+00:00 2026-06-03T08:32:18+00:00

I have installed NB 7.1, WAMPP 1.7.7 (with PHP 5.3.8) and XDebug 2.1.4. I

  • 0

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(), "\n"; // 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:32:19+00:00Added an answer on June 3, 2026 at 8:32 am

    When you start Debug mode in Netbeans and an unhandled exception gets through then it outputs to your browser just like it would if you weren’t running a debugger.

    Netbeans doesn’t magically catch them. i.e. you can’t analyze them the same way you can look at the contents of variables.

    The “netbeans-xdebug” is “running” still shows up because it is in fact still running and will continue to run until you stop it yourself or the debug session has some serious error occur, which probably won’t be php related. Usually if a major error occurs you’ll get some popup window. If you stop it yourself then netbeans will create a new tab in your browser saying the xdebug session has ended.

    If you hit refresh in your browser then netbeans will catch the request and analyze it and if you’ve setup break points it will stop at the break points. After that request has been serviced, if you hit refresh again, netbeans will keep catching any requests that come in.

    Edit : One thing I found on the xdebug site that might help you in a way with exceptions in the following option.

    xdebug.show_exception_trace
     Type: integer, Default value: 0 
    When this setting is set to 1, Xdebug will show a stack trace whenever 
    an exception is raised - even if this exception is actually caught.
    

    You can set this option in your php.ini file in the xdebug section.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed WAMP 2.1 on Windows 7 with PHP-5.3.4 and Apache-2.2.17 but instead
I have installed WAMP and running PHP scripts on localhost. I have enabled cURL.
I have installed php5 and mysql5 on my server , I can login to
I have installed the latest version of netbeans and its working.. I have opened
I have installed PHP using wamp server in Windows and I have give the
I have installed WAMP. I am using Tomcat 6 to run my PHP scripts.
Thanks in advance. I have Installed WAMP Server on System 4(192.168.1.104). I can Connect
i have installed on my computer WAMP with PHP 5.2.9-2 . I want to
I just installed WAMP on Windows XP. I have a simple PHP file that
I've got xdebug installed fine (showing up in phpinfo()) but I'm trying to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.