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

 

 

评论操作 固定链接
正式评论

Hi Ndenos,

Please, reproduce the issue with additional logging.

  1. Add #com.goide.dlv.DlvVm in Help | Diagnostic Tools | Debug Log Settings...
  2. Restart the IDE
  3. Add -trimpath to Go tool arguments (Run | Edit Configurations...)
  4. Reproduce the problem
  5. Collect the IDE logs via Help | Collect Logs and Diagnostic Data and upload it to https://uploads.jetbrains.com/
  6. Provide the logs ID

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

 

0
评论操作 固定链接

Thanks for the update.

It'd be great if you test your scenario on the latest GoLand build without -trimpath flag.

Thank you.

0
评论操作 固定链接

Also works well without trimpath and with the latest release!

 

1
评论操作 固定链接

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.

0

请先登录再写评论。