I was able to install and setup quite easily NetBeans 6.9.1 and Xdebug on my local environment, based on PHP 5.3.0 (XAMPP).

My problem now is the following: if I put a breakpoint on Wordpress's index.php or other Wordpress core PHP files, NetBeans correctly stop at desired position. If instead I put a breakpoint on a plugin file, an trigger the code execution NetBeans does not stop there.

Do you known how can be solved?

UPDATE: More info about what I am trying to debug

Plugin is called Vanilla Forums and has the following file structure:

- plugins
  - vanilla-forums
    + assets
    + nbproject
    + templates

I set the breakpoint inside a function named vf_validate_options defined in functions.php. I am sure that this function is executed, but NetBeans does not break there.

  • If you put a throw new Exception('die'); statement after the line of the breakpoint, does it then stop (in the meaning that this kills/ends your request)?
    – hakre
    Commented Feb 16, 2011 at 9:51
  • @hakre Yes, it throws the exception (I am sure that the code where the breakpoint is set is executed)
    – Drake
    Commented Feb 16, 2011 at 10:35
  • 1
    @Drake: Is this code executed in the main page, or in an Ajax call? I believe the Xdebug debugger must be enabled with some GET or POST variables and then sets a cookie, maybe it is not enabled for the Ajax request?
    – Jan Fabry
    Commented Feb 17, 2011 at 15:40
  • 1
    I have the exact same problem and still can't find a fix! I'm using nusphere phped but I tried Eclipse too with no results! The only file that xdebug stop on the breakpoint is are the wordpress "core" files. Neither the theme's php file are debugable! Let me know if you find a solution, I made a post on the wordpress official forum with no replies:(
    – Kreker
    Commented Feb 22, 2011 at 20:30
  • 1
    I think Jan Fabry is onto the solution. I prefer to use the Firefox plugin EasyXdebug, which will add the XDEBUG_SESSION_START query parameter to all requests. Commented Jun 13, 2011 at 13:34

5 Answers 5


There is an easy solution with a Firebox extension Xdebug Helper by Brian Gilbert. This sets cookies for the xdebug session which allows you to use xdebug within your WordPress plugins.

There are also extensions for Chrome, Safari and Opera. The links can be found on the xdebug website


You've followed these instructions right?



Hi @Drake:

Stupid question, I know, but have you "activated" the plugin? That's where I trip up when plugins are not being debugged.

  • Yes, plugin is activated. What am I trying to debug is a function trigger by a menu created by plugin self in administrator area.
    – Drake
    Commented Feb 16, 2011 at 16:42
  • @Drake - What is a "function trigger?" Can you please post your code as an update to your question? Commented Feb 16, 2011 at 20:33

there is no way to debug the plugin's files. The only way I found for debug wordpress is to use nusphere phped wich is , unfortunately, not freeware. That seems the only one can do that, I don't know why but I spend very long time figuring how to debug with netbeans and eclipse...with no results!


Well, since WordPress itself provides WP_DEBUG, and wp_die($msg) ... why whould you need to debug with Xdebug? Unless you are building your plugin using a framework?

  • xdebug offers many tools that WP_DEBUG and output don't - profiling and stepping through code for a start...
    – boisvert
    Commented Nov 18, 2019 at 14:46
  • Agreed, at the time I had very little knowledge regarding Xdebug.
    – adrian7
    Commented Feb 22, 2020 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.