Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 带有PHP Xdebug的PrestaShop 1.7出现异常并排除脚本中不工作的文件_Visual Studio_Visual Studio Code_Prestashop_Xdebug_Prestashop 1.7 - Fatal编程技术网

Visual studio 带有PHP Xdebug的PrestaShop 1.7出现异常并排除脚本中不工作的文件

Visual studio 带有PHP Xdebug的PrestaShop 1.7出现异常并排除脚本中不工作的文件,visual-studio,visual-studio-code,prestashop,xdebug,prestashop-1.7,Visual Studio,Visual Studio Code,Prestashop,Xdebug,Prestashop 1.7,使用PrestaShop 1.7开发我的应用程序,使用Xdebug调试我的代码。Xdebug文档链接是 但每次都会有例外 “完整性检查失败。” 调试脚本是 { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwl

使用PrestaShop 1.7开发我的应用程序,使用Xdebug调试我的代码。Xdebug文档链接是

但每次都会有例外

“完整性检查失败。”

调试脚本是

{
// 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' }
连接7:读取EconReset
{XDebugError:命令不可用
在新的响应中(/home/user/.vscode/extensions/felixbecker.php-debug-1.13.0/out/xdebugConnection.js:56:19)
在新断点处设置响应(/home/user/.vscode/extensions/felixbecker.php-debug-1.13.0/out/xdebugConnection.js:207:9)
连接时。(/home/user/.vscode/extensions/felixbecker.php-debug-1.13.0/out/xdebugConnection.js:599:20)
在Generator.next()处
至少(/home/user/.vscode/extensions/felixbecker.php-debug-1.13.0/out/xdebugConnection.js:4:58)代码:5,名称:'XDebugError'}
{XDebugError:命令不可用
在新的响应中(/home/user/.vscode/extensions/felixbecker.php-debug-1.13.0/out/xdebugConnection.js:56:19)
在新断点处设置响应(/home/user/.vscode/extensions/felixbecker.php-debug-1.13.0/out/xdebugConnection.js:207:9)
连接时。(/home/user/.vscode/extensions/felixbecker.php-debug-1.13.0/out/xdebugConnection.js:599:20)
在Generator.next()处
至少(/home/user/.vscode/extensions/felixbecker.php-debug-1.13.0/out/xdebugConnection.js:4:58)代码:5,名称:'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/**",
                "**/var/**",
                "**/src/**",
                "**/classes/Tools.php",
                "**/classes/PrestaShopAutoload.php"
            ]
        },
        {
            "name": "Launch currently open script",
            "type": "php",
            "request": "launch",
            "program": "${file}",
            "cwd": "${fileDirname}",
            "port": 9000
        }
    ]
}
我的解决方案 我通过忽略出现错误的文件和文件夹解决了这个问题

{
// 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
    }
]

请求供应商的支持。。。