gpt4 book ai didi

visual-studio - PrestaShop 1.7 与 PHP Xdebug 获取异常并排除脚本中的文件不起作用

转载 作者:行者123 更新时间:2023-12-04 13:40:00 26 4
gpt4 key购买 nike

使用 PrestaShop 1.7 开发我的应用程序并使用 Xdebug 调试我的代码。 Xdebug 文档链接是 https://xdebug.org/docs/ .

但是每次都会出现异常

"Integrity check failed."



调试脚本是
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"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
}
]
}

xdebug 控制台显示响应
connection 7: read ECONNRESET
{ XDebugError: command is not available
at new Response (/home/user/.vscode/extensions/felixfbecker.php-debug-1.13.0/out/xdebugConnection.js:56:19)
at new BreakpointSetResponse (/home/user/.vscode/extensions/felixfbecker.php-debug-1.13.0/out/xdebugConnection.js:207:9)
at Connection.<anonymous> (/home/user/.vscode/extensions/felixfbecker.php-debug-1.13.0/out/xdebugConnection.js:599:20)
at Generator.next (<anonymous>)
at fulfilled (/home/user/.vscode/extensions/felixfbecker.php-debug-1.13.0/out/xdebugConnection.js:4:58) code: 5, name: 'XDebugError' }
{ XDebugError: command is not available
at new Response (/home/user/.vscode/extensions/felixfbecker.php-debug-1.13.0/out/xdebugConnection.js:56:19)
at new BreakpointSetResponse (/home/user/.vscode/extensions/felixfbecker.php-debug-1.13.0/out/xdebugConnection.js:207:9)
at Connection.<anonymous> (/home/user/.vscode/extensions/felixfbecker.php-debug-1.13.0/out/xdebugConnection.js:599:20)
at Generator.next (<anonymous>)
at fulfilled (/home/user/.vscode/extensions/felixfbecker.php-debug-1.13.0/out/xdebugConnection.js:4:58) code: 5, name: 'XDebugError' }

此异常来自 /vendor/defuse/php-encryption/src/Crypto.php
我正在尝试排除文件夹和文件,例如 vendor , var , classes/Tools.php
我该如何解决这个问题?是否有任何其他调试工具支持 PrestaShop?

最佳答案

我的解决方案
我通过忽略出现错误的文件和文件夹解决了问题。

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"ignore": [
"**/vendor/**",//folder
"**/src/**",//folder
"**/var/**",//folder
"**/classes/module/**",//folder
"**/classes/Tab**",//file
"**/classes/Media**",//file
"**/classes/helper/**"//folder
]
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]

关于visual-studio - PrestaShop 1.7 与 PHP Xdebug 获取异常并排除脚本中的文件不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58638290/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com