The NetBeans IDE Early Access for PHP was released in April at the same time as NetBeans 6.1. Milestone 1 of NetBeans 6.5 now contains all features introduced in this release.
Setting up Netbeans PHP environment with XDebug is easier compared with Eclipse IDE. The most important step of setting up PHP with Xdebug in Netbeans is to configure PHP and XDebug, here is how:
- Check your PHP version by executing:
php -v
Now you will get something like:PHP 5.2.2 (cli) (built: May 2 2007 19:18:26)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies - Now you go to XDebug.org to download XDebug module corresponding to the PHP version installed on your machine as shown above, and put XDebug module into PHP's extension directory or somewhere else
- Now add the following to your php.ini which is normally under your PHP installation directory
[xdebug]
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
zend_extension_ts=D:\tools\php\ext\php_xdebug-2.0.3-5.2.5.dll - Now start up Netbeans 6.5 M1 or above (as of this writing, Netbeans 6.5 M1 is just available). You can download it from http://www.netbeans.org
- Go to Tools -> Options menu to bring up Netbeans Options dialog
- Select Miscellaneous button on top of the dialog and Click PHP tab, you will see the following
Basically you don't need to do anything unless you want to change some settings such as where php.exe is located at, how do you want to output the result, debugger port (default to 9000), whether you want debugger to stop at the first line of the php files etc
You may need to write a simple PHP script to test if it's working locally, if so then your installation is fine. Otherwise, make sure you follow the above steps
That's it. Simple and easy.
My Settings: Netbeans 6.5 M1, PHP 5.2.2 and XDebug
3 comments:
thx,it works!
HI...
I have done all the thing...
But in netbeans nothing is coming to write the port no.
Did I need to install x debugger ..pplz tell the procedure!!!
Codelobster IDE works better with xDebug
Post a Comment