Home>Article>Development Tools> How to debug go program with vscode

First create the simplest hello world output program as follows:

The key operations of debug:
Execute in the terminal:xcode-select --install
Execute in the terminal:go install github.com/derekparker/delve/cmd/dlv
Then click the debug button on the left side of vscode:

Configure several information in the pop-up json file:

Finally, debug, add breakpoints, and click the debug button to start, as shown below:


Recommended related article tutorials:vscode tutorial
The above is the detailed content of How to debug go program with vscode. For more information, please follow other related articles on the PHP Chinese website!