TYPO3 Xdebug PhpStorm
TYPO3 Xdebug PhpStorm
出于某种原因,我无法让 Xdebug 在本地(在我的 Mac)TYPO3 9.5 站点的 PhpStorm 中工作。它是使用 Composer 设置的,站点位于 /Users/myusername/Sites/mysite
Xdebug 已安装,在另一个带有单个测试 index.php 文件的本地 https://fun.test 上它工作正常。
我有正确的端口,创建了一个 'Run/Debug' 配置作为 PHP 网页,启动 url https://mysite.test。在该配置的服务器(mysite.test 443)上,我包含(也尝试不包含)路径映射。我还在绝对路径中设置了来自供应商 bin 映射的符号链接。但无论我尝试什么,我都会得到
Debug session was finished without being paused
It may be caused by path mappings misconfiguration or not synchronized local and remote projects.
我看过这些视频,但它们是较旧的 TYPO3 版本的示例,也没有 https,对我不起作用。
任何提示如何让它工作?
更新了部分错误日志
-> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///Users/myuser/Sites/mysite/var/cache/code/cache_core/ext_localconf_f91d966404f45802fa2d2f505b0b6efa59cfb322.php" lineno="884" type="Notice"><![CDATA[Undefined index: adminpanel_requestcache]]></xdebug:message></notify>
-> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///Users/myuser/Sites/mysite/public/typo3/sysext/core/Classes/MetaTag/AbstractMetaTagManager.php" lineno="299" type="Notice"><![CDATA[Undefined index: allowedSubProperties]]></xdebug:message></notify>
-> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///Users/myuser/Sites/mysite/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php" lineno="3913" type="Notice"><![CDATA[Undefined index: makeInstanceService]]></xdebug:message></notify>
现在可以了。在 PHP 网页 'Run/Debug Configurations' 服务器配置中,我在绝对路径中设置了来自供应商 bin 映射的符号链接,并输入了所有主要 'Project files' 文件夹的绝对路径(没有什么不同,但在那之后它起作用了)。
根据我的经验,上述错误信息通常是由于
- 未同步项目。如果您创建了一个远程项目,PhpStorm 会保留文件的本地副本(通常在 ~/PhpstormProjects/ 中)。确保你正在调试的文件是同步的(右键单击root:Deployment:download from)
- 不正确的路径映射
错误消息就是这么说的,但直觉上我总是低估了可能出现的同步问题。
缩小问题范围(以防万一你的断点没有被击中):
- Select "Run: Break at first line in PHP scripts" 检查会发生什么
出于某种原因,我无法让 Xdebug 在本地(在我的 Mac)TYPO3 9.5 站点的 PhpStorm 中工作。它是使用 Composer 设置的,站点位于 /Users/myusername/Sites/mysite
Xdebug 已安装,在另一个带有单个测试 index.php 文件的本地 https://fun.test 上它工作正常。
我有正确的端口,创建了一个 'Run/Debug' 配置作为 PHP 网页,启动 url https://mysite.test。在该配置的服务器(mysite.test 443)上,我包含(也尝试不包含)路径映射。我还在绝对路径中设置了来自供应商 bin 映射的符号链接。但无论我尝试什么,我都会得到
Debug session was finished without being paused It may be caused by path mappings misconfiguration or not synchronized local and remote projects.
我看过这些视频,但它们是较旧的 TYPO3 版本的示例,也没有 https,对我不起作用。
任何提示如何让它工作?
更新了部分错误日志
-> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///Users/myuser/Sites/mysite/var/cache/code/cache_core/ext_localconf_f91d966404f45802fa2d2f505b0b6efa59cfb322.php" lineno="884" type="Notice"><![CDATA[Undefined index: adminpanel_requestcache]]></xdebug:message></notify>
-> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///Users/myuser/Sites/mysite/public/typo3/sysext/core/Classes/MetaTag/AbstractMetaTagManager.php" lineno="299" type="Notice"><![CDATA[Undefined index: allowedSubProperties]]></xdebug:message></notify>
-> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///Users/myuser/Sites/mysite/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php" lineno="3913" type="Notice"><![CDATA[Undefined index: makeInstanceService]]></xdebug:message></notify>
现在可以了。在 PHP 网页 'Run/Debug Configurations' 服务器配置中,我在绝对路径中设置了来自供应商 bin 映射的符号链接,并输入了所有主要 'Project files' 文件夹的绝对路径(没有什么不同,但在那之后它起作用了)。
根据我的经验,上述错误信息通常是由于
- 未同步项目。如果您创建了一个远程项目,PhpStorm 会保留文件的本地副本(通常在 ~/PhpstormProjects/ 中)。确保你正在调试的文件是同步的(右键单击root:Deployment:download from)
- 不正确的路径映射
错误消息就是这么说的,但直觉上我总是低估了可能出现的同步问题。
缩小问题范围(以防万一你的断点没有被击中):
- Select "Run: Break at first line in PHP scripts" 检查会发生什么