Go With VSCode On Mac

  1. 安装 Go:
    brew install go

  2. 安装Go Debugger: Delve
    brew install go-delve/delve/delve

  3. 安装VSCode:
    brew cask install visual-studio-code

  4. 运行VSCode,安装Go插件: Rich Go Language support for VSCode

  5. 创建一个工作目录test,目录下创建一个hello.go文件:

    package main
    
    import "fmt"
    
    func main() {
        fmt.Println("Hello, 世界")
    }
    
  6. VSCode中打开test文件夹, Debug, Launch

Go With VSCode On Mac_第1张图片
屏幕快照 2017-03-16 上午9.20.51.png

你可能感兴趣的:(Go With VSCode On Mac)