{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${config:godotTools.editorPath.godot4}",
            "args": [
                "--path",
                "${workspaceRoot}"
            ],
            "stopAtEntry": false,
            "justMyCode": false
        },
        {
            "name": "Launch (Select Scene)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${config:godotTools.editorPath.godot4}",
            "args": [
                "--path",
                "${workspaceRoot}",
                "${command:godot.csharp.getLaunchScene}"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceRoot}",
            "console": "internalConsole",
            "justMyCode": false
        },
        {
            "name": "Auto Attach",
            "type": "godot-mono",
            "request": "attach",
            "address": "localhost",
            "port": 6007
        },
        {
            "name": "Attach",
            "type": "coreclr",
            "request": "attach",
            "justMyCode": false
        },
        {
            "name": "Launch in Editor",
            "type": "coreclr",
            "request": "launch",
            "program": "${config:godotTools.editorPath.godot4}",
            // "program": "env:GODOT4", // Alternative approach using environment variable
            "args": [
                "--path",
                "${workspaceRoot}",
                "--editor"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "console": "internalConsole",
            "justMyCode": false
        }
    ]
}