解决Mac M1 debug报错(could not launch process: can not run under Rosetta)

vscode调试:
由于版本安装的不适合与Debug,要安装成arm64的才可以
解决Mac M1 debug报错(could not launch process: can not run under Rosetta)_第1张图片

vscode调试:launch.json文件

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Package",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "/Users/jkwanga/go/src/dress_up/oasis/app/disguise/disguiseadmin/cmd/disguiseadmin"
            //主要是绝对路径写对
        }
    ]
}

安装dlv调试工具:

go install github.com/go-delve/delve/cmd/dlv

重启vscode 点击编辑即可!

你可能感兴趣的:(Centos/Network,macos,vscode,dlv)