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

How to debug go program with vscode

王林
Release: 2020-02-07 16:50:58
Original
5731 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template