Php 使用XDebug设置IntelliJ Idea远程调试

Php 使用XDebug设置IntelliJ Idea远程调试,php,debugging,intellij-idea,xdebug,Php,Debugging,Intellij Idea,Xdebug,我已经连续几天尝试在IntelliJ Idea和Xdebug中设置远程调试,但都没有成功 我有一个Windows 7主机和虚拟机VirtualBox,Windows XP作为web服务器。它安装了带有Apache、PHP和Xdebug的WampServer Xdebug配置正确: Summary Xdebug installed: 2.2.3 Server API: Apache 2.0 Handler Windows: yes - Compiler: MS VC9 - Architecture

我已经连续几天尝试在IntelliJ Idea和Xdebug中设置远程调试,但都没有成功

我有一个Windows 7主机和虚拟机VirtualBox,Windows XP作为web服务器。它安装了带有Apache、PHP和Xdebug的WampServer

Xdebug配置正确:

Summary
Xdebug installed: 2.2.3
Server API: Apache 2.0 Handler
Windows: yes - Compiler: MS VC9 - Architecture: x86
Zend Server: no
PHP Version: 5.4.16
Zend API nr: 220100525
PHP API nr: 20100525
Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:\WINDOWS
Configuration File: C:\wamp\bin\apache\apache2.4.4\bin\php.ini
Extensions directory: c:\wamp\bin\php\php5.4.16\ext
Web服务器和PHP工作正常,没有任何问题

以下是我在Intellij中设置远程调试的步骤:

文件->设置->PHP->服务器

运行/调试配置:

php.ini xdebug部分:

[Xdebug]
zend_extension = "c:\wamp\bin\php\php5.4.16\zend_ext\php_xdebug-2.2.3-5.4-vc9.dll"
;xdebug.profiler_enable=1
xdebug.profiler_output_dir="c:\wamp\tmp"
xdebug.remote_autostart=1
xdebug.remote_enable=1
;xdebug.remote_handler=dbgp
;xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.remote_host=192.168.56.1
;xdebug.idekey="intellij"
我已经试过打开/关闭这些行,但没有成功

当我从IntelliJ启动调试会话时,它会打开一个带有地址
的浏览器http://192.168.56.101/index.php?XDEBUG_SESSION_START=some id“
,而调试器开始等待相同的id

我已经尝试过的: -禁用/调整防火墙 -更改默认侦听端口 -通过从浏览器手动启动调试器设置“远程调试配置”模板 还有很多其他的

我使用了一个嗅探器来确保我的主机在端口9000上接收到一些东西:它确实从服务器接收到62个字节:

但没有数据。这正常吗?请给我一个进一步挖掘的提示


提前感谢大家。

通过使用XAMPP而不是WampServer重新安装web服务器,问题终于得到了解决。当然,它没有给我确切的答案是什么导致了以前的配置失败,但无论如何,现在它工作了,我对此非常满意

在intelliJ IDEA中,首先安装xdebug windows wamp上intelliJ IDEA上的xdebug的正确设置是外观 对于php.ini文件,在zend扩展名粘贴后,在底部找到xdebug 遵循以下步骤,然后重新启动wamp服务器 这对我很有用

[xdebug]
xdebug.remote_enable=On
xdebug.profiler_enable=On
xdebug.profiler\u enable\u trigger=On
xdebug.profiler\u output\u name=cachegrind.out。%t.%p
xdebug.profiler\u output\u dir=“c:/wamp/tmp”
xdebug.show\u local\u vars=0
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.remote_autostart=0