executable doesn't containt debug information
Greetings
I'm doing my first steps in Go. Yesterday when I left my IDE I was able to set breakpoints and debug. This morning, the red dots are replaced with crossed circles and I see this weird message:
executable doesn't containt debug information
What can I do to be able to debug again?
TIA
Please sign in to leave a comment.
Hi Greg,
Can you please provide steps on how to reproduce the issue? Also, a screenshot of the run configuration would help.
Finally, in the Debug Tool Window, you'll see a Console tab. Please expand the first four lines at the very top of the output and paste them here as well.
Thank you.
Thanks for your answer.
I have no idea on which steps could reproduce it (sorry I know it's not helping). At some point, debugging was available again, without any change to the run configuration... I have been suspecting maybe indexing could disable debugging? but this is a first little project with very little code, so even indexing should be take hours...
Hi,
I have the same problem, debugging from intellij + GO addon. It seems to happen within project dependencies (not in the project code). I try to set a breakpoint in a random line within the source code of the dependencies, but it is permanently disabled.
Roberto
Hello Roberto,
First of all, make sure that the IDE project root is corresponds to the compilation root.
Ideally, the project root directory in the IDE and in the compilation should contain the same structure when running the ls -alh (dir . on Windows) command. If it does, then automatic mapping shouldn't have any issues.
Additional logging can also help us, take the following steps:
I had the same problem.
And just like Roberto I have tried to debug one of the project dependencies (debug an external package to this project that is inside vendor package).
For each breakpoint in this dependency package I got: "executable doesn't contain debug information".
I was working with Go 1.15.2 and go modules.
For me the solution was
1. switching back to Go 1.12.7:
(preferences -> GOROOT -> Go 1.12.7)
2. Checking the "Enable vendoring support automatically" checkbox
(preferences -> Go Modules -> Enable vendoring support automatically, which is ignored since Go 1.14)
After that debugging breakpoints inside the dependency package started to work again! :)
Because I wanted to debug a dependency and I use go mod I also had to run all these commands as well:
$ export GO111MODULE=on
$ go mod vendor
$ go build -mod=vendor
Hi,
Thanks for your suggestions Daniil. When I got back to this issue after a while, it started working how it should. So probably the IDE restart did the trick.
Roberto
Same problem here, but in my case the code is NOT in a vendor or dependencies package. It is in project's own code dir (called internal). I can reach the code if start debugging in some files earlier but cant start right it this file. The control flow to desired function for breakpoint comes through pkg/ dependency files, but still I dont understand what the heck is going on. Pretty wierd and annoying.
Hello Argon, please pay attention that Go handles the internal packages in a specific way.
Could you please provide a structure (tree) of your project and steps to reproduce via Help | Contact Support menu?
I have nearly same problem too. In my case, not all vendored library can't be breakpoined.
How to reproduce.
1. clone https://github.com/solarwinds/rkubelog.git
2. set breakpoint line 129 of vendor/github.com/boz/kail/ds_builder.go
3. set breakpoint line 61 of vendor/github.com/boz/kcache/client/client.go
4. do debug
The idea.log is below. It complaint that could not find file, but that file actually exists.
Thanks for your steps to reproduce, but I can't do the same so far on the 2020.3.1 version.
What GoLand version are you using? Could you please send a screenshot of your Run Configuration (Run | Edit Configurations...) & Go Modules integration (Preferences | Go | Go Modules)?
Thank you Daniil Maslov , but my problem was gone, and I can't reproduce it either.
I tried something, such as, changing dependency to forked library (using replace keyword) and going back, manually building in terminal, or too tiny works to remember. As far as I remember, just changing the version of the library didn't help.
My run configurations and mod integration seem not so different.
Thanks for your kind reply. Feel free to drop a comment if you encounter the issue again.
I meet the same problem during golang debuging by intellij(with golang plugin).
For me, it was caused by wrong dependency detection of IDE. The dependencies libraries was shown as version A, then I label break point at version A, but program compile and ran with version B.
Adding break point at upper level code and step into dependency code shall reveal the real version.
Could you please share a point where it was incorrect?