VSCode *.code-workspace file

November 4, 2024 note-to-self backup vscode

An example of a <something>.code-workspace file, mostly for backup purposes:

{
    "folders": [
        {
            "path": "/Users/ha/Code/<app-name>"
        }
    ],
    "settings": {
        "php.executablePath": "docker compose exec -it <app-name> php",
        "!More PHPUNIT config options: https://marketplace.visualstudio.com/items?itemName=recca0120.vscode-phpunit!",
        "phpunit.command": "docker compose exec -it <app-name> /bin/bash -c",
        "phpunit.php": "php",
        "phpunit.phpunit": "vendor/bin/phpunit",
        "phpunit.paths": {
            "${workspaceFolder}/src": "/var/www/html"
        },
        "phpunit.envVars": {
            "XDEBUG_SESSION": 1
        },
        "phpunit.args": [
          "--configuration ./phpunit.xml",
          "--display-warnings",
          "--display-deprecations",
          "--teamcity",
          /* "--colors=always", */
          /* "-dxdebug.mode=coverage", */
          /* "--coverage-clover /var/www/html/coverage/${fileBasename}.xml" */
        ],
        "coverage-gutters.showLineCoverage": true,
        "coverage-gutters.coverageBaseDir": "/Users/ha/Code/<app-name>/src/000_coverage/",
        "coverage-gutters.coverageFileNames": [
          "coverage.xml",
          "coverage_Unit.xml",
          "coverage_Feature.xml",
          "coverage_Unit_Feature.xml",
          "coverage_Feature_Unit.xml",
        ],
        "!coverage-gutters.coverageReportFileName": "/Users/ha/Code/<app-name>/src/000_coverage/coverage_Unit.xml",
        "!coverage-gutters.manualCoverageFilePaths": [
         "/Users/ha/Code/<app-name>/src/000_coverage/coverage.xml"
        ],
        "!coverage-gutters.remotePathResolve": [
        ],
        "phpsab.snifferEnable": true
    },
    "launch": {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Listen for Xdebug",
                "type": "php",
                "request": "launch",
                "port": 9004,
                "pathMappings": {
                    "/var/www/html": "${workspaceFolder}/src"
                }
            },
            {
                "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,profile",
                    "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": 9004,
                "serverReadyAction": {
                    "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
                    "uriFormat": "http://localhost:%s",
                    "action": "openExternally"
                }
            }
        ]
    }
}