跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • mac M1 支持 golang debug 了
未分類
15 1 月 2021

mac M1 支持 golang debug 了

mac M1 支持 golang debug 了

資深大佬 : cydleadingx 12

https://www.cnblogs.com/maxzhang1985/p/14272787.html

大佬有話說 (5)

  • 資深大佬 : linuap

    稍微玩了一下,给后面的同学参考

    1. go-delve 的 master 分支已 merge 了对 arm mac 支持,直接用官方源即可
    2. 转译的 term 不支持使用这个 dlv,会报错.这导致现有的 vscode stable 无法使用这个 dlv 进行 debug, goland 应该是原生 arm 版所以没这个问题

  • 資深大佬 : pdckxd

    golang 用链接里的方法编译 delve master 分支 再替换 golang plugin 里的 dlv 命令,debug 会直接报错 kill 136

  • 資深大佬 : pdckxd

    有人试成功不?

  • 資深大佬 : jasonix

    很早就在 M1 上能 debug 了。
    我之前差不多是这样操作的:
    1.拉 https://github.com/oxisto/delve,darwin-arm64-lldb 分支编译出 dlv
    2.替换 /Users/jason/Library/Application Support/JetBrains/Toolbox/apps/Goland-ARM/ch-0/203.6682.164/GoLand.app/Contents/plugins/go/lib/dlv/mac 目录下的 dlv
    懒得编译的我提供一个我现在用的
    链接: https://pan.baidu.com/s/130xBWxyW-2p5wEnEbUxhmA 提取码: crwf

  • 資深大佬 : pdckxd

    @jasonix 也是不行,奇怪了,我的系统是 11.1

    GOROOT=/Users/user1/go #gosetup
    GOPATH=/Users/user1/.go #gosetup
    /Users/user1/go/bin/go build -o /private/var/folders/ss/8gmdbns14bgd7fvcz3v18r500000gn/T/___2go_build_main_go -gcflags all=-N -l /Users/user1/Downloads/StudyGo/main.go #gosetup
    “/Users/user1/Library/Application Support/JetBrains/Toolbox/apps/Goland-ARM/ch-0/203.6682.164/GoLand.app/Contents/plugins/go/lib/dlv/mac/dlv” –listen=0.0.0.0:58927 –headless=true –api-version=2 –check-go-version=false –only-same-user=false exec /private/var/folders/ss/8gmdbns14bgd7fvcz3v18r500000gn/T/___2go_build_main_go —

    Debugger finished with exit code 137 (interrupted by signal 9: SIGKILL)

    代码:
    package main

    import “fmt”

    func main() {
    fmt.Println(“Hello”)
    }

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具