If you are using delve to debug your Golang program and found an error
Go version 1.12.XX is too old for this version of Delve (minimum supported version 1.16, suppress this error with --check-go-version=false)
The root cause is your Golang version is too old, to fix this problem you can simply upgrade your Golang or if you don't want to update your Golang, please follow these steps
1. Go to your dlv directory
$ git clone https://github.com/go-delve/delve.git
$ cd delve
2. Check out to older version
$ git checkout v1.2.0
3. Re-install dlv
$ make install
4. Verify dlv version
$ dlv version
If you debug golang using vscode and found error "unknown command dap for dlv", please add this json section to .vscode/settings.json file
ไม่มีความคิดเห็น:
แสดงความคิดเห็น