需要帮助来配置xdebug,用于从IDE netbeans调试项目.
这些是我的组件的功能:
XAMPP 1.8.2
PHP:5.4.16
netbeans:7.3.1
Apache:2.4.4(Win32)
这是我的php.ini文件的最后一部分:
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9-nts.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"
;xdebug.trace_output_dir = "C:\xampp\tmp"
Run Code Online (Sandbox Code Playgroud)
当我运行phpinfo()时,没有安装xdebug,当我从netbeans调试项目时,它会显示"Waiting For Connection(netbeans-xdebug)".
有人可以帮我配置吗?非常感谢.
提前致谢.
我正在尝试调试一些PHP代码,并希望下载PHP的XDebug调试器.我只看到有用于下载的Windows二进制文件.是否可以在Ubuntu上使用它?
我目前正在尝试让Xdebug在我们的开发服务器上工作.作为客户端我使用netbeans和连接到目前为止工作没有问题.但是当我尝试在netbeans中设置一个断点时,它就会被忽略.
是的,我已经谷歌搜索了几个小时,并在这里找到了一些完全符合我描述的问题: SO 1 SO 2
但这似乎并没有为我解决.该Xdebug模块通过zend_extension = path/to/xdebug加载.所以在
/etc/php5/conf.d/xdebug.ini
我还查看了php5/apache和php5/cli php.ini以确保它没有加载extension = somewhere那里.我还检查了phpinfo()找到的"解析的其他.ini文件",似乎没有其他地方加载.
通过执行php -m我可以看到加载的Xdebug模块
[PHP Modules]
并在
[Zend Modules]
不确定这是否表明它仍然被加载两次或者它是否正常?如果我zend_extension=/path/to/xdebug.so从conf.d/xdebug.ini它删除它仍然不再加载.所以我真的认为它只是装在那里.
如果我设置了remote_log选项,则看到Netbeans正在尝试设置某些内容:
<- breakpoint_set -i 452 -t line -s enabled
-f file:///http:/development.xxx.de/users/itsame/index.php -n 15
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set"
transaction_id="452" state="enabled" id="258870001">
</response>
Run Code Online (Sandbox Code Playgroud)
但它似乎没有任何效果(看起来几乎和我上面发布的其他SO问题一样.但是如果我在php代码中做了一个手动xdebug_break(),它就会正确地处理它.
PHP版本是5.2.6,Xdebug是2.1.我有什么建议可以看看下一个吗?
我安装了PHP 5.5.3的MAMP.
我的php.ini文件(MAMP/conf/php5.5.3/php.ini)的结尾是这样的:
[OPcache]
zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/opcache.so"
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
[xdebug]
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
Run Code Online (Sandbox Code Playgroud)
但是,使用var_dump()进行测试时,xdebug仍无法正常工作.
我还能尝试什么?
编辑:我每次尝试改变时都重新启动了MAMP.我还检查了phpinfo().它在这里说我需要从MAMP编辑文件,而不是从finder编辑.但我无法找到MAMP让我去文件的地方......