xdebug / vscode-php-debug

PHP Debug Adapter for Visual Studio Code 🐞⛔

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to specify PHP Xdebug extension in VSCode?

Loki3000 opened this issue · comments

PHP version: 8.2.7
Xdebug version: 3.2.1
VS Code extension version: 1.32.1

Your launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9003
        },
        ...
    ]
}

I have two installed extensions: xdebug.php-debug and devsense.phptools-vscode. Both support PHP debugging.

How can I specify which one to use for debugging?

If both are enabled, every debug session is caught by devsense.phptools-vscode, but I prefer to use xdebug.php-debug for debugging.

If devsense.phptools-vscode is disabled, - everything works well, and step-debugging works through xdebug.php-debug.

Unfortunately, I need devsense.phptools-vscode enabled for other functions.

Is there a way to specify which extension to use for debugging?

Perhaps it's possible to set extension priority or something similar?

This has bugged me too for a long time. I am not sure if I can do anything about it in the extension alone. I will open a case with vscode.

Thank you for participating!
If you're right and the extensions are included in alphabetical order, can I try changing the extension name locally? Will it work?

I do not think that would be that trivial - you'd probably need to repackage it. Let's give some time to the wonderful VSC team to give some feedback.