Skip to content

xdebug on netbeans

February 28, 2013

I have got to admit that getting xdebug to work on netbeans was an uphill battle. However, it was well worth the effort. I had to get some resources from a few places and put the pieces together in order to make it work.

  • Go to php.ini (as reported in phpinfo()) and change the display_errors option to On
  • find xdebug at the bottom of php.ini and uncomment the zend_extension line
  • add the following to the bottom
    • xdebug.remote_enable=on
    • xdebug.remote_handler=dbgp
    • xdebug.remote_host=localhost
    • xdebug.remote_port=9000

On the way there, I wrongly thought I had to install xdebug, a new version of php (which would have the headers xdebug needed to build), autoconf (required by xdebug). But it turns out my LAMP installation already had xdebug. It just wasn’t turned on.

From NetBeans, I simply choose the file and choose the menu option “Debug->File”.

From → Technology

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: