An Oracle blog about NetBeans for PHP

New Features in PHP Debugger

Hi all, we are very happy today, because we can introduce you new features which were implemented into the PHP Debugger module. From now a debugging of PHP projects with NetBeans is much more comfortable. 

So enough words and let us introduce them!

The first:
Debugging has it's own tab in Tools -> Options -> PHP. So everything what was somehow connected with a debugging and was in a General tab is here now.

The second:
In the Debugging tab, there are two new text inputs which allow you to directly set XDebug settings. Now you can set:

  • Maximum Depth of Structures - which sets a visibility of nested structures (like nested arrays, objects in objects, etc.) and
  • Maximum Number of Children - which sets a visibility of e.g. array items during Watch evaluating (if you set it to 1 you will see only the first array item even though it has more then one item).

The third:
There is just another option which you can enable or disable in the new Debugging window. It's called Show Requested URLs. When it's enabled new Output Window occurs during debugging and currently processed URLs are showed there. They are clickable so after clicking on it a browser window is opened with the clicked URL.

The fourth:
And the last new option in the Debugging tab allows you to show or hide a new Output Window called PHP Debugger Console. If you want to see an output of your debugged scripts, just enable this option and you will see it in this new Output Window. But don't forget to set output_buffering = Off in your php.ini file to see it immediately.

The fifth:
It's the icing on the cake:) When you have an array in the Variables window (as a simple variable or a watch) you can see the number of array items and you don't have to expand a whole array.

And that's all for today. There are many other smaller improvements and fixes so please test it and if you find something strange or you have an idea for a great new enhancement, please report it into our BugZilla (component php, subcomponent Debugger). Thanks.

Join the discussion

Comments ( 18 )
  • Álvaro G. Vicario Thursday, August 18, 2011

    Please excuse the impertinence but... If you are working on this area, it'd be great if you could have a look at bug #189783 ( http://netbeans.org/bugzilla/show_bug.cgi?id=189783 ) which is apparently assigned to you.

    Thank you! :^)

    (I can't be only one who uses UNC paths...)

  • William Rouse Thursday, August 18, 2011

    In what version of the IDE is this feature available?

  • Ondrej Brejla Friday, August 19, 2011

    William: It's available in nightly build of NB 7.1 (http://bits.netbeans.org/download/trunk/nightly/latest/)

    Alvaro: I understand that it's annoying bug, but I did what I could and the rest of bugs have to wait for another release. Sorry for any inconvenience.

  • guest Tuesday, August 23, 2011

    Thank you for your hard work! This debugging output feature will be very helpful!

  • Matt Wednesday, August 24, 2011

    Thanks for keeping netbeans' PHP updated! Your work is much appreciated.

    P.S Random user request: update of Symfony support to 1+2, addition of Cake support. :)

  • Camden Wednesday, September 7, 2011

    Awesome! Thanks Ondrej - very nice! (for both updates and the blog post)

  • Milos Thursday, October 6, 2011

    Will you add these features to NetBeans debugger?

    * conditional breakpoints

    * changing variable value in watch window

  • Ondrej Brejla Thursday, October 6, 2011

    I would like to implement conditional breakpoints, but I have to evaluate XDebug support for this feature.

    I'm not really sure what you mean by changing variable value in watch window...can you descibe it more deeply? And please, can you file a new Enhancement issue into our bugzilla [1], so we can track it? Thanks a lot!

    [1] http://netbeans.org/bugzilla/enter_bug.cgi?product=php

  • guest Monday, January 9, 2012

    A year or more ago there were ongoing crash problems between netbeans and XDebug which resulted in an added IDE option 'Watches and Ballon Evaluation'to enable these (default OFF).

    Is it safe to assume these issues are a thing of the past? I notice the option is still there!

  • guest Saturday, January 14, 2012

    Also looking forward to symfony 1+2 support.

    Thanks for all the hard work.

    - Michael

  • KG Sunday, January 22, 2012

    The variables tab layout used during debugging is NOT preserved.

    Thanks in advance.

  • Kenny Monday, January 23, 2012

    Thanks for the continual improvements, keep it up.

    Bug report: The debugger variables view columns order and widths are never preserved which is annoying.

    Thanks in advance.


  • guest Monday, February 27, 2012

    I really miss Conditional breakpoint !!!

    I can read here(

    http://devzone.zend.com/1147/debugging-php-applications-with-xdebug/) that eclipse + xdebug is supporting this feature ( 2008 ) so I think no problem on xdebug side ...

    Please this is a really key feature for a debuger today

  • Ondrej Brejla Monday, February 27, 2012

    Hi, there is an enhancement in our bugzilla for this issue: http://netbeans.org/bugzilla/show_bug.cgi?id=132066

  • guest Monday, February 27, 2012

    how much time you will need guys to implement it ? 7.2. ?

    I don't think this require many lines of code ( maybe i'm wrong ... )

    it is one of the bigger (probabbly the biggest) deficiencies of netbeans debugger

  • guest Tuesday, March 6, 2012


    Since version 7.1 there is a different (an annoying) behaviour when debugging a php application.

    In previous versions, when you step into a statement that takes the flow into another file, only one extra tab would open no matter how many times you do that. Now, one tab is open for every single file that you step into, so you end up with a lot of tabs open in the IDE.

    Is this a bug or a feature?

  • Miguel Gil Saturday, May 4, 2013

    I have two machines with same operating system (Kubuntu 13.04) and Netbeans versions (7.3). In the first computer when I debug (breakpoint) it does not open new tabs in the IDE. In the other computer when I go to a breakpoint the IDE opens a new tab, showing the file deployed in the web server. The point is that sometimes I forget this behaviour and edit the web server file... losing this work when I save the original file.

  • guest Thursday, July 25, 2013

    "Step into" and related debugging commands are disabled on my installation. How can I enable them?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.