skip to content
Alvin Lucillo

Debug with arguments

/ 1 min read

💻 Tech

In the previous journal, I learned that there’s a test mode to specify arguments when I press F5. This can be done for launching Go binaries as well. In the example below, it uses debug mode and passes arguments to the binary.

    "configurations": [
        {
            "name": "Launch with arguments",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${workspaceFolder}",
            "args": ["--acccount-name", "name1", "--account-key", "123"],
        }
    ]