【发布时间】:2019-08-08 13:43:30
【问题描述】:
我正在为 Atom IDE 使用 XAMPP 和 PHP-Debug 包并下载 xdebug dll 文件。
这是我的 php.ini xdebug:
[xdebug]
zend_extension="C:\xampp\php\ext\php_xdebug-2.7.2-7.3-vc15-x86_64.dll"
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_connect_back=0 # Not safe for production servers
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_mode=req
xdebug.remote_autostart=1
xdebug.remote_log="C:\Users\mehra\Documents\xdebug.log"
并使用 XAMPP 和 ATOM IDE 运行一个简单的脚本,但我收到此错误:
[12120] Log opened at 2019-08-08 13:36:30
[12120] I: Connecting to configured address/port: localhost:9000.
[12120] E: Time-out connecting to client (Waited: 200 ms). :-(
[12120] Log closed at 2019-08-08 13:36:30
[12120]
我看到有人建议将xdebug.remote_autostart=1 更改为xdebug.remote_autostart=0
并阅读xdebug Time-out connecting to client. :-( using phpstorm 7.1.3/vagrant/virtualbox/magento,但仍然无法正常工作
PHP-调试器设置:
【问题讨论】:
-
1) 检查防火墙规则——确保允许 Atom(或 Atom 内的调试器包如何工作)接受 TCP 9000 端口上的连接。 2) 让它监听调试连接(我自己不使用 Atom,因此无法给出相关说明),然后使用
netstat或类似工具检查它实际上在 TCP 9000 端口上监听。 3)也许尝试127.0.0.1而不是localhost(有时会有所不同,特别是如果IPv6优先于IPv4) -
@LazyOne 1) 我关闭了防火墙 2) 我在 atom 网站上阅读了关于此的指南 (atom.io/packages/php-debug) dubegger 配置非常简单,端口 9000(netstat) 3)我把它改成 127.0.0.1 还是不行
-
"并且端口 9000(netstat) 中没有任何内容" 对我来说,这清楚地表明您错过了手册中的某些要点(例如手册中的 #3)。 .. 并且 Atom 还没有监听来自 Xdebug 的传入调试请求。如果它没有在听(无论出于何种原因).. 那么难怪 Xdebug 无法连接。
-
??为什么你认为这是 Xdebug 问题?我在该链接中看不到任何地方会说“xdebug bug”......我希望您了解 Xdebug(PHP 扩展)和 Php Debug(Atom 的调试扩展)之间的区别。
-
“Atom ide 使用 php debug 和 php debug 使用 xdebug 扩展 php debug 和 xdebug 从 atom 用户的角度来看是相同的” 不。 “Php Debug”是一个 Atom 包 .. 与 Xdebug 一起工作。 Php Debug Atom 包中的错误或错误配置并不意味着 Xdebug PHP 扩展中的错误或错误配置。
标签: php xampp atom-editor xdebug