executable doesn't contain debug information on GoLand
Context
So, I've installed Goland on a new computer, and I'm trying to setup again debugger.
* I cloned my project and built it (everything ok at that point)
* When I first launched the go debugger, it complained about my go version which was 386 and not x64.
* I removed the 386 go installation and installed the X64 instead.
* I did a "go clean" before doing a "go build"
* I also did a cmdline "go get" of the whole project and dependant packages (no modules on my project)
My issue
When setting up breakpoint, goland does not catch it
When hovering the breakpoint in the IDE, there is this message :
"executable doesn't contain debug information for c:/Users/blablabla[...]"
When setting up a breakpoint in main.go, debugger works. But breakpoint in imported packages does not work.
I activated logs and in idea.logs :
2021-05-05 16:00:15,781 [ 18633] INFO - #com.goide.dlv.DlvVm - could not find file C:/Users/ndenos/go/src/NexwayGroup/nx-xx-proxy/web/cdbHttpHandlers.go
org.jetbrains.concurrency.MessageError: could not find file C:/Users/ndenos/go/src/NexwayGroup/nx-xx-proxy/web/cdbHttpHandlers.go
But its wrong ... C:/Users/ndenos/go/src/NexwayGroup/nx-xx-proxy/web/cdbHttpHandlers.go exists on the filesystem
Any idea?
Software used : GoLand 2020.3.4
OS : Windows 10
Go : go1.13.15 windows/amd64
Please sign in to leave a comment.
Hi Ndenos,
Please, reproduce the issue with additional logging.
Also, please try to reproduce the issue on the latest GoLand version (File | Settings | Appearance & Behavior | System Settings | Updates | Check for Updates). We implement small fixes during the last updates.
Adding -trimpath fixed it!
thanks. I did not now this option
Thanks for the update.
It'd be great if you test your scenario on the latest GoLand build without -trimpath flag.
Thank you.
Also works well without trimpath and with the latest release!
Hi,
- Version: 2022.2.5
- Issue: Cannot set a breakpoint in a test file (can do it in the main file). If I add `-trimpath`, the error messages became "Cannot find debugger path for /path/to/the/file.go".
- Upload ID: 2023_03_05_uXWzjZ55Nvg6UCqrNvhAzP
Please take a look, thanks.
Hi,
Please see explanation here: https://youtrack.jetbrains.com/issue/GO-10461/goland-delve-remote-debugging-cannot-hit-breakpoints#focus=Comments-27-4650440.0-0
I'm reproducing this problem in GoLand 2023.3 EAP Build #GO-233.11555.11, built on November 1, 2023
Breakpoint set in a module dependency is disabled and tooltip reads exactly the same as for TS. Adding -trimpath fixed it.