Dav*_*vid 13 php debugging netbeans remote-debugging xdebug
我正在尝试在以下场景中使用XDebug
我从Windows主机创建了一个Netbeans项目,指向\\ guestIP\mysite.在项目运行配置中,我有以下内容:
在高级运行配置中:
我在我的Ubuntu VM上的php.ini中有以下内容
xdebug.remote_enable = on
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = /tmp
;xdebug.remote_host=localhost,<HostIP>, mysite.local.fr
xdebug.remote_connect_back=1
xdebug.remote_handler=dbgp
xdebug.idekey="netbeans-xdebug"
xdebug.remote_mode=req
Run Code Online (Sandbox Code Playgroud)
这些都不起作用,Netbeans不会在Windows的任何断点处停止.
使用Netbeans直接从我的VM调试工作正常.
有人能告诉我如何让我的调试器从Windows远程工作吗?谢谢
Eth*_*han 15
对不起,我不能发表评论了.@David @ JamesB41:我一直在寻找这个.我的设置是带有NetBeans 7.1的Windows 7主机和VirtualBox中的Ubuntu VM.我将NetBeans项目设置为远程项目,使用SFTP上载和下载.
以下设置适用于我,只需将主机的IP用作remote_host,并确保VM可以看到它.
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=10.217.165.193
xdebug.remote_port=9000
xdebug.remote_log="/tmp/log/xdebug.log"
Run Code Online (Sandbox Code Playgroud)
NetBeans将在入口点断点处停止(如果您在PHP-> Debugging中设置了选项). 但是,它不会停止在NetBeans创建的断点上,因为它会运行VM的文件.您可以使用xdebug_break(),它将显示堆栈和变量. 它将在NetBeans断点处停止,并突出显示是否在项目配置>运行配置>高级中正确映射文件夹.真棒.我完成了.
(connect_back配置似乎没有帮助,可能是因为没有填充$ _SERVER ['REMOTE_ADDR'].)
| 归档时间: |
|
| 查看次数: |
24535 次 |
| 最近记录: |