Configure Xdebug with netbeans and PHP


Xdebug’s Profiler is a powerful tool that gives you the ability to analyze your PHP code and determine bottlenecks or generally see which parts of your code are slow and could use a speed boost.

Here are the following steps for you to installing and configuring xdebug with netbeans

  • Install the Firefox plugin by given URL:
                         https://addons.mozilla.org/en-US/firefox/addon/easy-xdebug/
  • Install Xdebug using command below from terminal
                       sudo apt-get install php5-xdebug
  • Then open xdebug.ini from terminal:
                      vim /etc/php5/conf.d/xdebug.ini
  • Copy the content of the xdebug.ini file
         zend_extension=/usr/lib/php5/20090626/xdebug.so
         xdebug.remote_enable=1
         xdebug.remote_handler=dbgp
         xdebug.remote_mode=req
         xdebug.remote_host=127.0.0.1
         xdebug.remote_port=9000

         xdebug.profiler_enable_trigger=On
         xdebug.profiler_output_dir=/tmp
  •  open the php.ini file.
  •  paste the line you copied from the xdebug.ini into your php.ini file
  •  Restart the apache
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s