{
    // 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": "Viewer: Launch Chrome",
            "request": "launch",
            "type": "chrome",
            "url": "http://localhost:5173",
            "webRoot": "${workspaceFolder}/src/atopile/viewer/src",
            "preLaunchTask": "viewer: dev"
        },
        {
            "name": "Python: Attach to debugpy",
            "type": "python",
            "request": "attach",
            "connect": {
                "host": "localhost",
                "port": 5678
            }
        },
        {
            "name": "Debug Extension Only",
            "type": "extensionHost",
            "request": "launch",
            "args": ["--extensionDevelopmentPath=${workspaceFolder}/src/vscode-atopile"],
            "outFiles": ["${workspaceFolder}/src/vscode-atopile/dist/**/*.js"],
            "preLaunchTask": "vscode-extension: watch",
            "presentation": {
                "hidden": false,
                "group": "",
                "order": 2
            }
        },
        {
            "name": "Python Attach to Process",
            "type": "python",
            "request": "attach",
            "processId": "${command:pickProcess}",
            "justMyCode": false,
            "presentation": {
                "hidden": false,
                "group": "",
                "order": 3
            }
        },
        {
            "name": "Python Config for test explorer (hidden)",
            "type": "python",
            "request": "launch",
            "console": "integratedTerminal",
            "purpose": ["debug-test"],
            "justMyCode": true,
            "presentation": {
                "hidden": true,
                "group": "",
                "order": 4
            }
        },
        {
            "name": "Debug Extension (hidden)",
            "type": "extensionHost",
            "request": "launch",
            "args": ["--extensionDevelopmentPath=${workspaceFolder}/src/vscode-atopile"],
            "outFiles": ["${workspaceFolder}/src/vscode-atopile/dist/**/*.js"],
            "env": {
                "USE_DEBUGPY": "True"
            },
            "presentation": {
                "hidden": true,
                "group": "",
                "order": 4
            }
        },
        {
            "name": "Python debug server (hidden)",
            "type": "python",
            "request": "attach",
            "listen": { "host": "localhost", "port": 5678 },
            "justMyCode": true,
            "presentation": {
                "hidden": true,
                "group": "",
                "order": 4
            }
        }
    ],
    "compounds": [
        {
            "name": "Debug Extension and Python",
            "configurations": ["Python debug server (hidden)", "Debug Extension (hidden)"],
            "stopAll": true,
            "preLaunchTask": "vscode-extension: watch",
            "presentation": {
                "hidden": false,
                "group": "",
                "order": 1
            }
        }
    ]
}
