虽然安装了 Xdebug,但调试器未命中
我已经从 php.ini 启用了 Xdbug。如何从 Eclipse 启用调试。我在 Eclipse 中设置了调试器,但每次尝试调试创建新配置时,它们都不会被命中。
调试器设置:
I have enabled Xdbug from php.ini. How do i enable debugging from eclipse. I set the debugger in eclipse but they are never hit, each time when ever it try to debug a new configuration is created.
debugger setting:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来您的调试器会话已经在运行。这就是您收到该消息的原因。当您点击“调试”时,Eclipse 通常会切换到“调试”透视图。您可以通过单击“打开视角”按钮手动切换到它。
如果您使用虚拟主机,请确保使用该主机名创建一个新服务器。转到 Windows ->首选项,然后
PHP ->调试。选择
PHP Servers
选项并使用您的虚拟主机创建一个新服务器。之后,使用新创建的服务器创建新的运行配置。创建配置后,您只需运行它即可。您还可以通过转到“运行”->“快速访问它”。调试历史记录。只有当您至少运行一次后,它才会出现在历史记录中。
Looks like your debugger session is already running. That's why you're getting that message. Eclipse usually switches to the Debug perspective when you hit debug. You can manually switch to it by clicking on the Open Perspective button.
If you're working with vhosts, make sure to create a new Server with that hostname. Go to
Windows -> Preferences
and thenPHP -> Debug
. Select thePHP Servers
option and create a new server with your vhost.After that, create a new Run Configuration with your newly created server. Once you've created the configuration, you can simply run it. You can also quick access it by going to
Run -> Debug History
. It will only show up in history once you've run it at least once.解决了,
对以下几行进行了评论。
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=10000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="C:\xampp\tmp"
resolved it ,
following lines were commented.
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=10000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="C:\xampp\tmp"