nystudio107/craft

VSCode Xdebug Configuration

Closed this issue · 2 comments

Question

I'm using vscode and am not sure where the xdebug configuration in the readme should go. is this a settings json block in the .vscode folder or does this belong somewhere else in the project?

Additional context

This is the settings block in question:

To use Xdebug with VSCode install the PHP Debug extension and use the following configuration:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9001,
            "log": true,
            "externalConsole": false,
            "pathMappings": {
                "/var/www/project/cms": "${workspaceRoot}/cms"
            },
            "ignore": ["**/vendor/**/*.php"]
        }
    ]
}

mmmmm I'm not sure unfortunately, as I use PhpStorm... but I see that port setting is wrong, it should be 9003 now; I've fixed it -- perhaps @urbantrout can help?

The configuration needs to be saved in .vscode/launch.json

The port should match xdebug.remote_port as seen here:

xdebug.remote_port=9003