snivilised / pixa

🧙 Directory tree based bulk image processor (Also serves as a working example of how to use extendio, cobrass and arcadia)
MIT License
0 stars 0 forks source link

add dlv launch debug config #165

Closed plastikfan closed 3 months ago

plastikfan commented 3 months ago

see:

The following is a starting point for launch.json config:

    {
        "label": "Run headless dlv",
        "type": "process",
        "command": [
            "dlv"
        ],
        "args": [
            "debug",    
            "--headless",
            "--listen=:2345",
            "--api-version=2",
            "${workspaceFolder}/cmd/cli",
            "-- arg1=true -host=foo.com",
        ],
        "isBackground": true,
        "problemMatcher": {
            "owner": "go",
            "fileLocation": "relative",
            "pattern": {
                "regexp": "^couldn't start listener:"
            },
            "background": {
                "activeOnStart": true,
                "beginsPattern": "^API server listening at:",
                "endsPattern": "^Got a connection, launched process"
            }
        }
    }

this is equivalent to running this on the command line:

dlv debug --headless --listen=:2345 . -- /Users/plastikfan/dev/test --profile blur --files "wonky*" --dry-run

but note that the path containing the workspace folder needs to be changed to point at the main.go program in pixa

You will probably need multiple entries as arguments need to be hard-coded into each each entry.