为了账号安全,请及时绑定邮箱和手机立即绑定

PHP Xdebug 调试在第一个断点处停止在 VSCode 中工作

PHP Xdebug 调试在第一个断点处停止在 VSCode 中工作

PHP
米脂 2021-09-18 21:39:28
我在 Windows 10 Pro 64 位上使用 Wamp。首先,基于 PHP XDebug 的调试在 Visual Studio Code 中的普通 Core PHP 应用程序上运行良好,但是当我开始调试基于 PhalconPhp (MVC) 的应用程序时,它在第一个断点处停止并且不继续,无论我尝试什么 - 继续 (F5) , Step Over (F10) 等。没有任何键或选项起作用。我已经检查了所有类似的问题和解决方案 - 尝试将端口从默认 9000 更改为 9001 inphp.ini和launch.json,添加了各种帖子中建议的所有额外配置,尽管我没有进行远程调试。尝试设置单个和多个断点,并尝试将它们保留在代码开头、中间或结尾的不同行上。配置文件xdebug.remote_enable = 1xdebug.remote_autostart = 1xdebug.remote_connect_back=1xdebug.profiler_enable = Onxdebug.profiler_enable_trigger = Onxdebug.profiler_output_name = cachegrind.out.%t.%pxdebug.profiler_output_dir ="R:/Temp"xdebug.show_local_vars=1xdebug.remote_port = 9000xdebug.remote_log=R:\Temp\xdebug.log启动文件{    "version": "0.2.0",    "configurations": [        {            "name": "Listen for XDebug",            "type": "php",            "request": "launch",            "port": 9000        },        {            "name": "Launch currently open script",            "type": "php",            "request": "launch",            "program": "${file}",            "cwd": "${fileDirname}",            "port": 9000        }    ]}没有错误消息。调试器不会移动一英寸并停留在第一个断点处。我只能在调试器中重新启动执行,其他操作(Step In、Step Over、Continue...)都不起作用。我也有,xdebug.log但没有看到任何有用的东西。更新:调试适用于所有 Php 程序,包括 Phalcon with VSCode 1.36.1、XDebug 2.6.1、Php 7.2.14 on Windows 10。我认为 VSCode 和 XDebugger 对于较新版本有一些不兼容问题,但不确定。
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 233 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信