visual code add quick debug profile to go lang project

visual code add quick debug profile to go lang project

how to it:
in vs code > vscode/launch.json file, add below code:    (or used left debug panel > add profile)

    {
        "name": "xg",
        "type": "go",
        "request": "launch",
        "mode": "debug",
        "remotePath": "",
        "port": 8086,
        "host": "127.0.0.1",
        "program": "${env:GOPATH}/src/sx98/xg/main.go",
        "cwd": "${env:GOPATH}/src/sx98/xg/",
        "env": {},
        "args": [],
        "showLog": true
    }

Then, in left debug panel, choose "xg", now can debug quickly. From now, no need locate to "src/sx98/xg/main.go" and press F5.


Comments

Popular posts from this blog

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3

Global can earn money wordpress blog Advertising Alliance Introduction–1 BidVertiser

pkrss发布