PrestaShop 1.7 с PHP Xdebug получает исключение и исключает файлы в скрипте не работает - PullRequest
1 голос
/ 31 октября 2019

Использование PrestaShop 1.7 для разработки моего приложения и использование Xdebug для отладки моего кода. Ссылка на документ Xdebug: https://xdebug.org/docs/.

Но она будет получать исключение каждый раз, когда

"Проверка целостности не удалась."

сценарий отладкиis

{
// 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?

1 Ответ

0 голосов
/ 08 ноября 2019

Я решил проблему, проигнорировав папку поставщика. Я не уверен, что это правильный путь. Изменен сценарий отладки:

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