Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Monday, November 7, 2011

Debugging PHP in NetBeans (in Ubuntu)



Here are the steps I used to setup PHP debugging in NetBeans (6.8 at the time of this writing) in Ubuntu 10.

sudo apt-get install php-pear
sudo apt-get install php5-dev
sudo apt-get install php5-xdebug



Edit your PHP INI settings
sudo nano /etc/php5/apache2/php.ini

Add the following lines under extensions:


zend_extension=/usr/lib/php5/the-folder/xdebug.so
xdebug.remote_enable=on


In my case it was ""/usr/lib/php5/20090626+lfs".  You will have to find the xdebug.so file in the correct folder.

Restart Apache
sudo /etc/init.d/apache2 restart


NetBeans PHP Debug Settings
  1. Goto tools->Options
  2. Select PHP
  3. On the General tab
  4. If this is your first time configuring xdebug, you may want to keep "Stop at First Line" checked.  this way when you start debugging you should know right away that your setup is correct. 
Start Debugging
  • Add some break points.
  • Right-click your project and select Debug

Friday, July 9, 2010

Ubuntu

I need the experience...I need to learn.  I've been a long time user of Windows, just because that's the easiest.  It's what has always been there at both home and work.

But now I'm trying Ubuntu at home.  And I must say it is becoming addictive and fun.  Yes there is a learning curve for us newbies, but I think I like it.  There ae some things that are very easy to do, others take some trial and error.  Everything is much faster (so far) from what I've seen.  I'm trying to get better at the command shell, but my typing is not the best.

Faster?
- Open a file to edit. yes
- Run a command that's not recognized? A "try this" will be given, including how to get the files needed to run the command.  I tried using drush and it wasn't recognized.  Ubuntu told me how to get it.  One command later and I'm running drush.  No need to surf, download, and install.  If the package is out there, you can start using it very quickly.