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

How to debug go program with vscode

王林
王林 Original
2020-02-07 16:50:58 5610browse

How to debug go program with vscode

First create the simplest hello world output program as follows:

How to debug go program with vscode

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:

How to debug go program with vscode

Configure several information in the pop-up json file:

How to debug go program with vscode

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

How to debug go program with vscode

How to debug go program with vscode

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn