![netbeans调试配置 netbeans调试配置](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
apache端口8050,xdebug端口9000
1.把项目放到apache的htdocs下(一定要放在htdocs上,要么调试的时候xdebug会一直卡在“等待连接中”)
2.把php_xdebug-2.1.2-5.2-vc6.dll拷贝到php安装目录下的ext目录下
3.配置php.ini
zend_extension_ts="D:/php-5.2.17/ext/php_xdebug-2.1.2-5.2-vc6.dll"
[xdebug]
xdebug.remote_enable=on
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir="D:/tmp"
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
[xdebug]
xdebug.remote_enable=on
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir="D:/tmp"
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
4.netbeans中
1)常规->选择流程其
2)php->调试输入会话ID(会话ID可在phpinfo中查看“xdebug.idekey”)
启动调试后可以看到http://localhost:8050/项目名称/index.php