# Unable to debug PHP with editors/vscode after upgrading to php81



## rawthey (Apr 18, 2022)

With lang/php81 and editors/vscode I can enable debugging and set breakpoints in my PHP scripts but they are not acted on.

After upgrading from php74 I replaced all PHP extensions with the corresponding php81 versions.


```
curlew:/# pkg info -x php
mod_php81-8.1.4_2
php81-8.1.4_3
php81-bz2-8.1.4_3
php81-calendar-8.1.4_3
php81-ctype-8.1.4_3
php81-curl-8.1.4_3
php81-dom-8.1.4_2
php81-exif-8.1.4_3
php81-extensions-1.1
php81-fileinfo-8.1.4_3
php81-filter-8.1.4_3
php81-gd-8.1.4_3
php81-iconv-8.1.4_3
php81-intl-8.1.4_3
php81-mbstring-8.1.4_3
php81-mysqli-8.1.4_3
php81-opcache-8.1.4_3
php81-pdo-8.1.4_3
php81-pdo_sqlite-8.1.4_3
php81-pecl-xdebug-3.1.4
php81-phar-8.1.4_3
php81-posix-8.1.4_3
php81-session-8.1.4_3
php81-simplexml-8.1.4_2
php81-sqlite3-8.1.4_3
php81-tokenizer-8.1.4_3
php81-xml-8.1.4_2
php81-xmlreader-8.1.4_2
php81-xmlwriter-8.1.4_2
php81-zip-8.1.4_3
php81-zlib-8.1.4_3
phpMyAdmin5-php81-5.1.3
```

I've tried adding the pathname for php in settings.json (although debugging worked fine with 7.4 without it) but that had no effect.

```
{
    "editor.insertSpaces": false,
    "files.exclude": {
        "**/*~": true,
        "**/RCS": true
    },
    "timeline.excludeSources": [],
    "editor.wordWrap": "on",
    "editor.minimap.enabled": false,
    "telemetry.enableCrashReporter": false,
    "telemetry.enableTelemetry": false,
    "search.exclude": {
        "**/RCS": true
    },
    "php.validate.executablePath": "/usr/local/bin/php",
    "php.debug.executablePath": "/usr/local/bin/php",
    "[php]": {
        "editor.wordSeparators": "`~!@#%^&*()-=+[{]}\\|;:'\",.<>/?"
    },
}
```


----------



## rawthey (Apr 20, 2022)

Looks like this will be one of life's unsolved mysteries. Debugging consistently failed to work on the day that I upgraded PHP despite several reboots as I switched between boot environments to check for differences between php71 where debugging worked and php81 where it didn't. However on booting up the php81 boot environment the following day debugging worked fine and has continued to do so ever since


----------

