Windows Dev Box Try 3 2020

Posted: 2020-05-25 20:53:18

Yes this is try number 3. See here for the first 2 goes at it.

With WSL2 out and a great laptop I wanted to give this another try.

Xdebug

Using my previous notes in the above post and https://gcompagnon.github.io/wsl2/xdebug/vscode/php-fpm/2019/09/17/WSL2_php_VSCode_Xdebug.html

I removed the reference to the host:

[xdebug]
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9009
xdebug.remote_log = /var/log/xdebug.log

in Visual Code my launch.json ended up looking like this:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "hostname": "0.0.0.0", 
            "port": 9009
        },
        {
            "name": "Launch currently open script",
            "type": "php",
            "request": "launch",
            "program": "${file}",
            "hostname": "0.0.0.0", 
            "cwd": "${fileDirname}",
            "port": 9009
        }
    ]
}