工具准备:

NetBeans:http://www.netbeans.org.cn/

Xdebug :http://www.xdebug.org/wizard.php

php5.6 :http://windows.php.net/

说明:Xdebug的版本需跟PHP的版本兼容,可以在本地运行phpinfo(),然后将结果粘贴到http://www.xdebug.org/wizard.php这个页面,会给出对应的版本的下载


PHP中配置Xdebug:

[php_xdebug];xdebug的扩展的地址zend_extension=php_xdebug.dllxdebug.remote_enable=onxdebug.remote_handler=dbgpxdebug.remote_host=localhost;远程端口号xdebug.remote_port=9000

NetBeans的运行结果如下: