executable doesn't contain debug information on GoLand

Completed

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

 

 

0
7 comments
Official comment

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

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.
 

0

Please sign in to leave a comment.