How can I launch a debug session in VSCode with multiple go files?

Viewed 242

I have two .go files in the main package. I can run them with command go run main.go plugin.go. I can also debug them with dlv dlv debug main.go plugin.go.

But I don't know how to debug them in VSCode, since the program key in launch.json can take only one go file as value.

This is my launch.json file

{
        "name": "player",
        "type": "go",
        "request": "launch",
        "mode": "auto",
        "program": "${workspaceFolder}/playerserver/main.go",
        "args": ["playerserver.conf.json"]
}
1 Answers
Related