xDebug似乎可以安装,但无法与NetBeans连接 [英] xDebug seems OK installed, but not connecting with NetBeans

查看:53
本文介绍了xDebug似乎可以安装,但无法与NetBeans连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在已经尝试了数小时的时间,以使xDebug(从源代码编译为2.0.5)可以在装有NetBeans 6.8的MacBook OS X上运行.我已经安装了MAMP,并正在使用它运行一个小的PHP(5.2)测试程序,没有问题.但是,当我尝试调试时,我在Netbeans中得到了以下文本:"Waiting for connection(netbeans-xdebug)"(等待连接(netbeans-xdebug)),然后什么也没有发生.已为Debugger Port 9000配置了Netbeans.MAMP中没有Zend优化.

I have now tried for hours getting xDebug (2.0.5 compiled from source) to work on my MacBook OS X with NetBeans 6.8. I have installed MAMP and am running a small PHP (5.2) test program with it, no problem. But when I try to debug I get this text in Netbeans: "Waiting for connection (netbeans-xdebug)" and nothing more happens. Netbeans is configured for Debugger Port 9000. No Zend Optimization in MAMP.

我已遵循以下步骤: http: //netbeans.org/kb/docs/php/configure-php-environment-mac-os.html#installEnableXdebug http://www.xdebug.org/docs/install http://forums.netbeans.org/topic1513-0-asc-0 .html

I have followed this: http://netbeans.org/kb/docs/php/configure-php-environment-mac-os.html#installEnableXdebug and http://www.xdebug.org/docs/install and http://forums.netbeans.org/topic1513-0-asc-0.html etc

这是我php.ini的一部分

Here is part of my php.ini

[XDebug]

;zend_extension="/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"

;[Zend]

;zend_optimizer.optimization_level=15

;zend_extension_manager.optimizer=/Applications/MAMP/bin/php5/zend/lib/Optimizer-3.3.9

;zend_optimizer.version=3.3.9

; Xdebug config for Mac OS X and NetBeans IDE

zend_extension=/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so

xdebug.remote_enable=1

xdebug.remote_handler=dbgp

xdebug.remote_mode=req

xdebug.remote_host=localhost

xdebug.remote_port=9000

xdebug.idekey="netbeans-xdebug"

我已经阅读了很多安装说明等,并且phpinfo显示xDebug已作为V.5.2.11正常安装(通过MAMP中的打开开始页面"查看).但是,当我在终端PHP -m中尝试时,没有看到xdebug列出.我最终发现从/etc中读取了PHP.INI,因此我将MAMP php.ini复制到了那里的php.ini中,从而在其中添加了xdebug.se,localhost,端口9000等信息.在列出xdebug之后,当我也进行PHP -m时,也列出了NetBeans问题.足够奇怪的php -i显示版本5.2.10,而不是上面的5.2.11!

I have read a lot of installation instructions etc and phpinfo show that xDebug is installed OK as V.5.2.11 (seen via "Open Start Page" in MAMP). However when i try in terminal PHP -m i do not see xdebug listed. I finally figured that PHP.INI is read from /etc so I copied the MAMP php.ini to php.ini there, thus added the xdebug.se, localhost, port 9000 etc info there. After that xdebug IS listed when I do PHP -m too, but I STILL get the NetBeans problem. Strange enough php -i shows version 5.2.10, not 5.2.11 as above!

我也尝试过此操作,为idekey添加了"netbeans-xdebug":

I also tried this, adding the "netbeans-xdebug" for idekey: Why does xdebug not establish connection with NetBeans?

为什么PHP_INFO()似乎在../MAMP/...下找到我的PHP.INI文件,而不是从/etc中读取PMP -m时找到我的PHP.INI文件?

How come PHP_INFO() seemed to find my PHP.INI file under ../MAMP/... and not when doing PMP -m when it is read from /etc ?

如何才能使PHP始终在MAMP下找到INI文件,这样我就不必使用两个PHP.INI文件来运行PHPINFO()和PHP -m了?

How can I get PHP to always find the INI file under MAMP so I dont have to use two PHP.INI files to et PHPINFO() and PHP -m to work?

既然xDebug似乎已正确安装但仍无法在NetBeans中运行,如何解决NetBeans问题?需要双重php.ini的东西吗?我可以将xdebug编译错误,怎么知道? xdebug/php中的php版本有问题吗?如何检查?

How can I resolve the NetBeans problem now that xDebug seems to be installed correctly but still not working in NetBeans? Something with this need for dual php.ini? Could I have compiled xdebug wrong, how to know? Something with php versions in xdebug / php? How to check?

这是php -i结果的一部分:

Here is a part of the result from php -i:

xdebug

xdebug support => enabled
Version => 2.0.4

Supported protocols => Revision
DBGp - Common DeBuGger Protocol => $Revision: 1.125.2.6 $
GDB - GNU Debugger protocol => $Revision: 1.87 $
PHP3 - PHP 3 Debugger protocol => $Revision: 1.22 $

Directive => Local Value => Master Value
xdebug.auto_trace => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 0 => 0
xdebug.collect_return => Off => Off
xdebug.collect_vars => Off => Off
xdebug.default_enable => On => On
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => no value => no value
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => no value => no value
xdebug.dump.SESSION => no value => no value
xdebug.dump_globals => On => On
xdebug.dump_once => On => On
xdebug.dump_undefined => Off => Off
xdebug.extended_info => On => On
xdebug.idekey => pettermagnusson => netbeans-xdebug
xdebug.manual_url => http://www.php.net => http://www.php.net
xdebug.max_nesting_level => 100 => 100
xdebug.profiler_aggregate => Off => Off
xdebug.profiler_append => Off => Off
xdebug.profiler_enable => Off => Off
xdebug.profiler_enable_trigger => Off => Off
xdebug.profiler_output_dir => /tmp => /tmp
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_autostart => Off => Off
xdebug.remote_enable => On => On
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => 127.0.0.1 => 127.0.0.1
xdebug.remote_log => /tmp/xdebug.log => /tmp/xdebug.log
xdebug.remote_mode => req => req
xdebug.remote_port => 9000 => 9000
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.show_mem_delta => Off => Off
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.trace_output_dir => /tmp => /tmp
xdebug.trace_output_name => trace.%c => trace.%c
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 3 => 3

Rgds 下午

推荐答案

我从Komodo下载了错误的xDebug.so,以某种方式,我自己的构建也不好.再次下载,现在可以了.哇,这花了我很多小时,而且没人能帮上忙! /PM

I downloaded the wrong xDebug.so from Komodo and somehow also my own build was no good. Downloaded again and now its OK. Wow, this took me MANY hours, and no one could help either! /PM

这篇关于xDebug似乎可以安装,但无法与NetBeans连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆