Skip to content

Debuging

Madalin Ignisca edited this page Aug 27, 2021 · 4 revisions

Visual Studio Code with Remote Containers

Simply use F5 with the default launch configurations. Works out of the box.

PHPStorm or any other IDE, including Visual Studio Code without Remote Containers

! Important - project must be in localhost with project folder mounted in /projects/workspace. Do not forget to set your mappings. Run your scripts using the aliases phpdbgreq or phpdbgcli.

Debuging web requests for Laravel: phpdbgreq artisan serve --host=0.0.0.0 Debuging queue workers for Laravel: phpdgbcli artisan queue:work

For VSCode example launch configuration (works in any mode):

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "stopOnEntry": true,
            "pathMappings": {
                "/projects/workspace": "${workspaceFolder}"
            }
        }
    ]
}

More info to follow up.

Clone this wiki locally