XDebug未在NetBeans中建立连接
我的XDebug扩展未建立与NetBeans的连接。以下是我已经在php.ini文件中放置的设置:XDebug未在NetBeans中建立连接
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost:8080"
;xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
请帮我解决问题。任何帮助,将不胜感激。
要在Netbeans IDE中调试您的php代码,您应该在Netbeans中启用XDebug
。要做到这一点转到Tools
- Options
那里选择PHP
选项卡,并确保调试端口和会话ID匹配您的XDebug
配置php.ini
文件。之后点击确定。
像这样更改你的php.ini
文件。
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
;xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1" <--- here
xdebug.trace_output_dir = "C:\xampp\tmp"
然后重新启动Apache服务器[XAMPP或WAMP]。
如果这个解决方案不是在您的浏览器选择PHP版本标签的工作转到 localhost
右击选择所有和复制内容,并将其粘贴here。如果您有旧版本的XDebug
,请下载最新的php_xdebug.dll
文件。将其复制到C:\xampp\php\ext\
目录并完成。
我试过你的解决方案Netbeans无法连接到xdebug,它会一直保持连接。 – Zawar
检查此[Stackoverflow线程](http://stackoverflow.com/questions/17613726/netbeans-shows-waiting-for-connection-netbeans-xdebug)和[this](http://www.devside.net/wamp -server/netbeans-waiting-for-connection-netbeans-xdebug-issue) – Shashanth
哦!它终于奏效了。 thankx。我只复制粘贴你的设置。忘了添加端口= 9000。谢谢你的工作。 – Zawar
'xdebug.remote_connect_back'被注释掉 –