'Problem with Xdebug 3 configuration on Step debugging with VSCode

I'm currently facing some problems trying to debug a Laravel project (PHP 7.3.31).

I'm using the Visual Studio Code Extension "Php Debug" from Felix Becker
https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug

I'm able to connect on Visual Studio Code and stop the code at any specific breakpoint, but when I try to step over it redirects me to the router.php file on \vendor\laravel\framework\src\Illuminate\Routing, calling this function public prepareResponse.

This is my current configuration for Xdebug on php.ini:

[XDebug]
zend_extension="C:\xampp73\php\ext\php_xdebug.dll"
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_port=9003
xdebug.remote_port=9003
xdebug.idekey=VSCODE

And this is the configuration for the launch.json on VSCode:

"version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9003
        },
        {
            "name": "Launch currently open script",
            "type": "php",
            "request": "launch",
            "program": "${file}",
            "cwd": "${fileDirname}",
            "port": 0,
            "runtimeArgs": ["-dxdebug.start_with_request=yes"],
            "env": {
                "XDEBUG_MODE": "debug,develop",
                "XDEBUG_CONFIG": "client_port=${port}"
            }
        },
        {
            "name": "Launch Built-in web server",
            "type": "php",
            "request": "launch",
            "runtimeArgs": [
                "-dxdebug.mode=debug",
                "-dxdebug.start_with_request=yes",
                "-S",
                "localhost:0"
            ],
            "program": "",
            "cwd": "${workspaceRoot}",
            "port": 9003,
            "serverReadyAction": {
                "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
                "uriFormat": "http://localhost:%s",
                "action": "openExternally"
            }
        }
    ]
}

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source