Unable to inspect a map in the debugger using go 1.24 and goland 2024.3
Creating a new project that uses go 1.24 and adding
m := make(map[string]string)
m["a"] = "b"
m["c"] = "d"
then set a breakpoint on the third line and debug in goland I expect to be able to inspect the map but instead see an “Internal debugger error: runtime error: invalid memory address or nil pointer dereference”

After a bunch of troubleshooting including collecting diagnostic logs as suggested in https://intellij-support.jetbrains.com/hc/en-us/community/posts/23420991558546--Solved-GoLand-2024-3-1-can-not-debug-unit-test-and-main I found the path to the dlv.exe that goland is usinge (C:\Users\<username>\AppData\Local\Programs\GoLand\plugins\go-plugin\lib\dlv\windows\dlv.exe) and tried to debug with it on the command line:
dlv.exe debug .\main.go
Version of Delve is too old for Go version go1.24.1 (maximum supported version 1.23, suppress this error with --check-go-version=false)
Since there appears to be no way to update the go-plugin from inside the IDE (it's bundled) I did
go install github.com/go-delve/delve/cmd/dlv@latest
and then copied the dlv.exe from C:\Users\<username>\go\bin replacing the goland plugin one and things work again; just sharing this here to help others that run into the same thing (and hopefully Jetbrains can fix it soon).
Please sign in to leave a comment.
Hi Bjorn Hansen ! Thank you for sharing this. Can I please ask you to check if using the most up-to-date version of our IDE makes any difference as well? You can try using 2024.3.4 - we bundle the latest Delve versions with the releases and if the update of delve helped, it could mean that updating GoLand would help we well as it'd have the latest Delve version installed too.
dI had updated to the latest GoLand before doing the manual delve update to see if that would fix it; it didn't but now I'm suspicious that the update didn't actually get all the way applied because my toolbox says:
IIRC, I did restart GoLand and it wasn't showing this before, so I don't know if there's an even newer release now or it was misleading me before. Let me test…
After applying the update it seems to have replaced the plugin files with a new dlv which does work (version 1.24.0 replacing my manual upgrade to 1.24.1), so it appears the latest GoLand release does contain a sufficiently new dlv.exe.
Checking my slack conversation with a co-worker (who could also repro this ), we both had
and now I have
so I guess the update didn't get fully applied on my machine last week.
Ah, I see. Maybe a restart was needed to finalize the process. In any case, while the latest version doesn't have a problem anymore, we can close this case I believe (especially as you provided a workaround for our users who can't update the IDE for some reason).
Thank you for checking this and please let us know if anything else comes up and we'll be at your service.
I am also facing the same issue.
MacOS version: Sequoia 15.3.2
Goland version: 2024.3.5
Currently i just cannot use remote debugging which is quite limiting.
Hi Bhargava, Madhav , could you please provide some code snippets using which you're able to reproduce the issue and also send us the IDE logs (Help | Collect Logs and Diagnostic Data)?
Thank you!
I do not find a way to upload the logs as part of this conversation. I have uploaded to my google drive. Let me know if you can access https://drive.google.com/file/d/1-o-ovaXbYEXMlTIYfG0OAXTVgyXNAtyb/view?usp=sharing
Since i am almost at the limit in google drive, once you have downloaded the logs, then please leave a msg so that i can remove it.
>could you please provide some code snippets using which you're able to reproduce the issue
You should be able to reproduce this with any code. I currently share the code snippet as its currently a private project.
Bhargava, Madhav Thank you for the prompt reply. I'm sorry I didn't provide a link to the upload. Please use this one instead and send me the upload code once the logs are added - https://uploads.jetbrains.com/ . You can safely remove logs from your Google Drive once you add them to our storage.
Thank you!
Thanks for the link. I have uploaded the logs now. Please have a look.
Upload id: 2025_03_26_f2gDXvS1fHdv9rC4RVH3Mo (file: goland-logs-20250326-1424107977012033404507050.zip)
Hi Bhargava, Madhav ! Thank you for the details. I've accessed the logs, however, must admit I don't see any errors specifically related to Debugger there. Could you please enable additional logging, reproduce the problem and send us the logs again?
1. Add `#com.goide.dlv.DlvVm` in Help | Diagnostic Tools | Debug Log Settings.
2. Restart GoLand.
3. Reproduce the issue with the debugger again to collect the necessary information about your environment.
4. Provide IDE logs via Help | Collect Logs and Diagnostic Data.
Also, you mentioned you're debugging remotely - can you provide some screenshots or a video to illustrate the run/debug configuration you're using for this? Are the errors you receive exactly the same as originally reported by Bjorn, or slightly different?
Thank you!
In idea.log you will see the following entries:
I will regenerate the logs anyways again. For remote debugging - its a local process that i connect to via the IDE. To give more context - i use https://skaffold.dev/ to deploy in `debug` mode which allows the IDE to connect on a specific port. Nothing fancy.
Re-uploaded the logs and a screenshot of the debugger view where threads and variables are typically viewed.
Upload id: 2025_03_27_qNkxKBMUf9dtS1phgjahv5 (files: Screenshot 2025-03-27 at 3.44.22 PM.png, goland-logs-20250327-15462514228031234132619309.zip)
Could you please try these steps and see if they work:
1. Go to Settings | Build, Execution, Deployment | Debugger | Data Views | Go
2. Uncheck the Enable String() checkbox.
If these steps help, then it looks like you have encountered GO-17930 (https://youtrack.jetbrains.com/issue/GO-17930). It is currently under active investigation.
same issue
go version go1.24.0 darwin/arm64
The new version of GoLand fixed this for me
Lipeng Were you able to resolve this out?