Docksal and VSCode and Xdebug

To setup xdebug with docksal and VSCode there is not much to do. Make your debug profile with info like this

{
    "version": "0.2.0",
    "configurations": [
      {
        "name": "Listen for XDebug",
        "type": "php",
        "request": "launch",
        "port": 9000,
        "pathMappings": {
          "/var/www/": "${workspaceRoot}",
          "/var/www/vendor/bin/drush": "${workspaceRoot}/bin/drush"
        }
      },
      {
        "name": "Launch currently open script",
        "type": "php",
        "request": "launch",
        "program": "${file}",
        "cwd": "${fileDirname}",
        "port": 9000
      }
    ]
  }

where main part is about proper port to be set (9000) and pathMappings which are           "/var/www/": "${workspaceRoot}", with that if docksal has running xdebug and browser has proper plugin it should run without a problem. Have this in your docksal.yml undser services, so xdebug is running when docksal is building enviroment

  cli:
    environment:
      - PHP_IDE_CONFIG=serverName=${VIRTUAL_HOST}
      - XDEBUG_ENABLED=1

This should be enough but if you need a bit more, check docs here
https://docs.docksal.io/tools/xdebug/