[Share] How to use Xdebug+netbeans IDE to build PHP development debugging environment
Beginner PHP Development, because has not been able to build a remote debugging environment, resulting in an unusually low development efficiency.
I was spoiled by MS, apparently unable to get used to this Notepad +ie Explorer development model. So decide to build a PHP development environment that can be debug.
After reading the multi-data, I decided to use Nb+xdebug to build the environment. As the steps for setting up the environment are slightly cumbersome, it is hereby recorded for forgetting.
1, first to download NetBeans, currently the latest version of NetBeans 7.0, pay attention to choose which with PHP plugin.
For the sake of convenience, I downloaded the version containing full features.
Give a link:
Http://netbeans.org/downloads/start.html?platform=windows&lang=zh_CN&option=all
2. Download the version of Xdebug you need.
2.1 Preparatory work
Before you do that, make sure you're loaded with XAMPP, which is a PHP and Apache,mysql,perl integration Suite. Currently the latest version is 1.7.4 Final. A download link is also given here
Http://www.newhua.com/soft/50127.htm
2.2 Testing XAMPP Installation conditions
If everything is ready, the browser enters http://localhost:80 to see if apache,php is installed correctly.
You can use Phpinfo () to view the installation of PHP features.
2.3 Installing Xdebug
Xdebug is just a extension of PHP. Go to Xdebug's official website to download.
A download address is also given here
http://xdebug.org/download.php
Note that there are many versions here, how to choose to open the browser again to see the output of the Phpinfo function. Depending on the PHP version, the PHP build environment (VC6 or VC9) is the thread safe (TS) to select a suitable version of Xdebug.
The configuration of the 3,xdebug.
Modify the Xdebug section of the php.ini.
To ensure that several configuration options are turned on, it is generally recommended to turn on several options.
zend_extension= "Path to Xdebug"
such as "Zend_extension=/php/ext/php_xdebug-2.1.0-5.2-vc6.dll"
Xdebug.remote_enable=on
Xdebug.remote_handler=dbgp
Xdebug.remote_host=localhost
xdebug.remote_port=9000//default is 9000 suggest it.
Then restart the Apache service. View the configuration items under the Xdebug section in Phpinfo.
Note that seemingly xampp in the php.ini has been integrated xdebug only comments up. All we have to do is remove the annotations.
Debug in 4,netbeans.
Go to NetBeans, create a new PHP project, and write PHP code.
Then use the set breakpoints under the "Debug" menu to step into the common menu feature items of the IDE, such as steps through (step over) and other Ms.
When the breakpoint is broken, you can also see a window that looks at the value of the variable such as watch,local. is not feeling very enjoyable, from then on the development of PHP program can say goodbye to simple Notepad + browser mode. Have a PHP IDE that is comparable to the VS development environment. More importantly, this series of tools are free.
Share to: more
------Solution--------------------
Support a bit
------Solution--------------------
What's the difference between xdebug and browsing directly through a browser?
------Solution--------------------
Good, the record is very detailed ...
Start also not accustomed to ie+ code test mode, may also be accustomed to win vs working mode.
But now using the pattern of ie+ code, gradually become accustomed to ...
Think of the way of using VS now, you might not get used to it ...
------Solution--------------------
Support One. Thanks for sharing.
------Solution--------------------
Thanks for sharing, I'm using Zend Debugger debugging
------Solution--------------------
Study under
------Solution--------------------
Good, very detailed, basically is through the FF test, with Firebug debugging.
------Solution--------------------
With Zend Debugger debugging support remote debugging very convenient don't know xdebug support remote debugging not
------Solution--------------------
I don't know how it's going to work.
------Solution--------------------
Hitch-Ride
Xdebug+eclipse Environment Construction can refer to here
http://blog.teamhaka.com/archives/403
------Solution--------------------
References:
references:
Hitch-Ride
Xdebug+eclipse Environment Construction can refer to here
http://blog.teamhaka.com/archives/403
Well, not CSDN blog.
Indicates that the network cannot be sisu ...
Can't sisu the net?
Chinese companies rarely have such restrictions unless they are big companies
------Solution--------------------
Support a bit