2

Starting debugging, I get:

API server listening at: 127.0.0.1:23350

And debugger hangs, I cannot step into, step over, step out. Only can stop and restart.

go version is

go version go1.16.4 darwin/arm64

launch.json is

{
    "version": "0.2.0",
    "configurations": [
    {
        "name": "Launch file",
        "type": "go",
        "request": "launch",
        "mode": "debug",
        "program": "${file}"
    }
    ],
}
Intolighter
  • 150
  • 3
  • 15
  • 1
    You have the `amd64` version of `go` installed. You need `darwin/arm64`. Read the following bug ticket: https://github.com/go-delve/delve/issues/2246 – Jens May 23 '21 at 11:25
  • I updated the go sdk. And get another problem. Updated the question. – Intolighter May 24 '21 at 08:13

1 Answers1

1

TL;DR: This is not an issue with VS Code or Delve. Use version 1.6.1 for a fix.


This problem was a bug in LLVM. Checkout the bug report. There is a bug in the GoLand bug tracker that is a bit more interesting to read though: related GoLand bug.

Solution:

Use version 1.6.1 of Delve.

See: https://github.com/go-delve/delve/releases/tag/v1.6.1

From the Changelog:

Correctly read G address on linux/arm64

That's the fix for the issue.

Jens
  • 20,533
  • 11
  • 60
  • 86