background
Unable to debug version 1.20 b
The error is reported as follows:
No goroutine selected
Lazy people don't want to upgrade the goland version.
How to deal with it
1. Install the latest dlv tools
go install /go-delve/delve/cmd/dlv@latest
2. Find the dlv tool you just installed and copy it
# is located in the bin directory of $GOPATH. If you don't know where $GOPATH is, you can execute go env to view it$GOPATH/bin/
3. Find the installation path of goland
# ls -ls xxxxx\JetBrains\GoLand 2022.3\plugins\go-plugin\lib\dlv # total 0 # drwxr-xr-x 1 0 May 23 21:48 linux/ # drwxr-xr-x 1 0 May 23 21:48 linuxarm/ # drwxr-xr-x 1 0 May 23 21:48 mac/ # drwxr-xr-x 1 0 May 23 21:48 macarm/ # drwxr-xr-x 1 0 Nov 11 15:37 windows/ # drwxr-xr-x 1 0 May 23 21:48 windowsarm/ #My system is in win10, so enter windows and enter different paths according to different systemsxxxxx\JetBrains\GoLand 2022.3\plugins\go-plugin\lib\dlv\windows
4. Backup the files under this path
The dlv file suffixes under this path in different systems are different, and the backup is based on the actual situation of the system.
# Backup dlv file"" -> ""
After the backup is completed, proceed to the next step
5. Paste the dlv file just now to this directory
6. Restart goland
7. Try debugging
Verify that the debug is correct, if it is correct, you can use the dlv.
If it is incorrect, there is no way to upgrade the goland version, delete the new dlv file just now, and finally rename the backup dlv back to the original name.
This is the article about solving the problem that the old version of Goland cannot debug the new version of Go. For more related contents of Goland cannot debug the new version of Go, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!