简体   繁体   English

在PHP 7和Ubuntu 16.04中使用Xdebug的debugclient

[英]Using Xdebug's debugclient with PHP 7 and Ubuntu 16.04

I want to debug a PHP script locally using the XDebug debugclient. 我想使用XDebug debugclient在本地调试PHP脚本。 I don't care about using a remote IDE or anything like that. 我不在乎使用远程IDE或类似的东西。

Unfortunately, I always this /tmp/xdebug.log 不幸的是,我总是这个/tmp/xdebug.log

I: Connecting to configured address/port: 127.0.0.1:8083.
E: Time-out connecting to client. :-(

I've tried with both the php-xdebug package and compiling the latest XDebug 2.4.1 from source and I get the same result. 我已经尝试了php-xdebug包并从源代码编译了最新的XDebug 2.4.1,我得到了相同的结果。

I've also tried ports ranging from 9000 (default), 9005, 8083, etc. 我还尝试了9000(默认),9005、8083等端口。

My xdebug.ini looks like this: 我的xdebug.ini看起来像这样:

zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=8083
xdebug.remote_log=/tmp/xdebug.log
xdebug.idekey=mbb

This is Ubuntu 16.04, PHP 7.0.8, and Xdebug 2.4.1. 这是Ubuntu 16.04,PHP 7.0.8和Xdebug 2.4.1。

Can anyone suggest anything? 有人可以建议什么吗?

how do you initiate the debug session? 如何启动调试会话? did you tried to use xdebug_break()? 您是否尝试使用xdebug_break()?

or maybe the communication to port 8083 is blocked by iptables? 还是与端口8083的通信被iptables阻止了? (iptables --list) (iptables --list)

is there something in /tmp/xdebug.log? /tmp/xdebug.log中有东西吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM