Netbeans等待连接到XDEBUG

 另一种Xing福_290 发布于 2023-02-13 20:46

Netbeans不会连接到xdebug.我试过以下帖子的建议:

调试IDE与XDebug的端口连接:"等待连接"

netbeans显示"等待连接(netbeans-xdebug)"

但它并没有解决我的问题.

似乎Netbeans连接到xdebug,因为在等待连接时,对Web服务器[Apache2]的所有请求都被阻止.端口[9001]似乎正在使用中:

roxy@Pixy011 ~ $ sudo nmap -sS -O 127.0.0.1

Starting Nmap 6.00 ( http://nmap.org ) at 2013-11-28 20:48 EST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000029s latency).
Not shown: 990 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
139/tcp  open  netbios-ssn
443/tcp  open  https
445/tcp  open  microsoft-ds
631/tcp  open  ipp
902/tcp  open  iss-realsecure
3306/tcp open  mysql
8080/tcp open  http-proxy
8081/tcp open  blackice-icecap
9001/tcp open  tor-orport   <---- Opened by java

xdebug.ini:[我已经确认它是在phpinfo()中加载的]

zend_extension=/usr/lib/php5/20100525/xdebug.so

xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_mode="req"
xdebug.remote_host="127.0.0.1"
xdebug.remote_port=9001
xdebug.idekey="netbeans-xdebug"

Netbeans配置:

Debugger port: 9001
Session ID: netbeans-xdebug
Stop at first line: Checked
All other options are unchecked

项目属性:

Host: 127.0.0.1
Port: 9001

编辑:我注意到Netbeans没有将XDEBUG_SESSION_STOP附加到URL.我不认为这与此问题有关,因为Netbeans仅在关闭调试会话后打开页面.

我也禁用了SELinux

1 个回答
  • 在Ubuntu 13.04 64bit php 5.4.9-4 Xdebug v2.2.3 netbeans 7.4
    我有同样的问题并通过以下方式解决:
    1.继续http://xdebug.org/wizard.php按照说明编译自己的xdebug.所以
    2.在netbean 7.4一般选项(抱歉我没有声望10发布图片)测试连接.确保代理服务器上的设置正确:对我来说"无代理服务器"正在运行.
    3.在php选项调试选项卡中将xdebug设置端口更改为9001或9000以外的其他设置.我选择9002但你可以尝试直到找到一个空闲端口(如果端口不是免费的,请告诉你)
    4.在php.ini中或者用于ubuntu /etc/php5/conf.d/20-xdebug.ini中的 用户

    zend_extension =/usr/lib/php5/20100525/xdebug.so #where你把你的重新调整的xdebug.so
    [xdebug]
    xdebug.remote_autostart = 0
    xdebug.remote_enable = 1
    xdebug.remote_handler ="dbgp"
    xdebug.remote_mode ="req "
    xdebug.remote_port = 9002#你发现的端口是免费的,并在netbeans中设置
    xdebug.remote_host = 127.0.0.1
    xdebug.profiler_enable = 0
    xdebug.profiler_output_dir ="/ tmp
    /"xdebug.idekey ="netbeans-xdebug"
    xdebug. remote_log ="/ home/#user_name#/ xdebug.log"#your用户名

    5. sudo service apache2 restart

    这样做之后我可以再次调试php.

    2023-02-13 20:50 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有