Xdebug在Vscode Laravel项目中不工作
我安装了Xdebug并使用phpinfo()
进行了检查。
我尝试使用“启动当前打开脚本”选项调试public/index.php
,并且效果很好。
定义测试路线,一个控制器,我启动了“收听Xdebug”选项,然后我在浏览器中转到了该URL。但是在预选的断点上什么都没有发生。
启动。json
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"log": true
},
xdebug.ini
zend_extension=xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_log = /tmp/xdebug_remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9003
- php 7.2
- laravel 5.6
- ubuntu 20.04
- xdebug 3.1.2
I installed Xdebug and checked with phpinfo()
.
I tried debugging public/index.php
with "Launch currently open script" option and it worked fine.
Defining a route for testing, a controller, I started the "Listen for Xdebug" option, and then, I went to that url in my browser. But nothing happens at the preselected breakpoint.
launch.json
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"log": true
},
xdebug.ini
zend_extension=xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_log = /tmp/xdebug_remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9003
- PHP 7.2
- Laravel 5.6
- Ubuntu 20.04
- Xdebug 3.1.2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在使用Xdebug 3.1.2。但是您所有的设置仍然适用于Xdebug 2。 。要使用Xdebug 3设置从上方复制Xdebug 2设置,请使用:
简称:
You are using Xdebug 3.1.2. but all your settings are still for Xdebug 2. There is a handy upgrade guide that you most definitely should read. To replicate the Xdebug 2 settings from above with Xdebug 3 settings, use:
Or in short: