Xdebug just opens wp acorn menu, not site? - getting xdebug working in sage10 with vanilla wp

Hello everyone! I’m tasked with getting xdebug working with Sage 10 and documenting how to get that configured properly, and I believe it is almost there but at a bit of a snag now.

The images we’re using for development are the same images we use for other PHP frameworks such as Laravel, and xdebug is working fine there so I believe it’s perhaps something in the launch.json file in VS Code that is causing this issue.

In our xdebug.ini we have the following configuration

zend_extension=xdebug.so
xdebug.mode=debug
xdebug.start_with_request=no
xdebug.remote_enable=0
xdebug.remote_autostart=0
xdebug.default_enable=0

This works well with Laravel and Magento, once we set the .env to be https://localhost and the ENV to development.

We’re using Sage 10 in vanilla Wordpress and not through Bedrock at this time, as we will mostly be deploying themes and not entire applications.

In VS Code there is this launch.json - just the section for “Launch Build-In web server”

{
            "name": "Launch Built-in web server",
            "type": "php",
            "request": "launch",
            "runtimeArgs": [
                "-dxdebug.mode=debug",
                "-dxdebug.start_with_request=yes"
            ],
            "program": "${workspaceFolder}/index.php",
            "cwd": "${workspaceFolder}",
            "port": 9003,
            "serverReadyAction": {
                "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
                "uriFormat": "http://localhost:%s",
                "action": "openExternally"
            }
}

When starting xdebug however in VS Code, the debug console output is the wp acorn list of commands, and visiting https://localhost:9003 brings up an “ERR_EMPTY_RESPONSE”.

We have tried a few different combinations of the "program" and "cwd" properties and most of them result in no output, this current configuration is the only one that results in any output although its just the list of Acorns commands.

Is anyone aware of what the correct launch.json configuration is for running xdebug with Sage 10 with vanilla Wordpress? I did do extensive searching but it seems most of the topics involved Bedrock or Trellis with Sage.