Laravel Xdebug 与 SPA(Vue.js、React.js ..)

问题描述 投票:0回答:1

前端使用单页应用程序(如 Vue.js、React.js 等)时,如何使用 Xdebug 调试 Laravel 项目?这方面的教程似乎已经过时了。

我已经在我的 Windows 机器上使用 Laragon nginx、PHP 8.1.2 设置了 Xdebug,并且还从 Xdebug 官方网站为我的 PHP 安装了相关的 xdebug.dll。但 Xdebug 无法连接到我的 PhpStorm IDE。我还在 Chrome 上安装了 Xdebug 帮助程序扩展,它可以为 PhpStorm 正确发送 cookie 标头。

[12344] Log opened at 2022-04-20 19:55:22.015861
[12344] [Step Debug] INFO: Checking remote connect back address.
[12344] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[12344] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[12344] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 127.0.0.1:9003.
[12344] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port: 127.0.0.1:9003. :-|
[5520] Log opened at 2022-04-20 19:55:32.343684
[5520] [Step Debug] INFO: Checking remote connect back address.
[5520] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[5520] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[5520] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 127.0.0.1:9003.
[5520] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:9003 (from REMOTE_ADDR HTTP header). :-)
[5520] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///D:/Projects/iq/iq-integrate/public/index.php" language="PHP" xdebug:language_version="8.1.2" protocol_version="1.0" appid="5520" idekey="PHPSTORM"><engine version="3.1.4"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2022 by Derick Rethans]]></copyright></init>
php laravel phpstorm xdebug
1个回答
0
投票

也许这会对某人有帮助 我请求使用扩展来发送 xdebug 密钥并且 它帮助了我。 xdebug 开始工作 其他扩展(例如 xdebug-helpers)不会发送 xdebug 密钥。 我在 vuejs spa 上的前端应用程序

© www.soinside.com 2019 - 2024. All rights reserved.