Questions tagged [delve]

Delve is a debugger for Go

Delve is a debugger for the Go. Most Go editors/IDEs use delve as the backend for their debugger features.

Homepage.

201 questions
0
votes
1 answer

How to change a register value during debugging a Go binary using Delve?

Exactly as the question says: During debugging a Go binary, I want to change the value of a register. help set in (dlv) returns: (dlv) help set Changes the value of a variable. [goroutine ] [frame ] set = See…
Newbie
  • 591
  • 1
  • 5
  • 11
0
votes
1 answer

Debugging a Go Process on a Container does not listen on the mapped port

I am using Goland IDE on MacOSX and I'm trying to debug an application running on the container. I'm trying to attempt remote debugging, just that the container is on my local. When I run the debugger on my IDE it does stop on the breakpoint but…
jkasper
  • 236
  • 4
  • 19
0
votes
1 answer

Date value while debugging

I am using VS Code, and while debugging if I check value of a time.Time variable/field, I get numeric value in "ext" of time.Time{} object. What would be best way to evaluate it in human readable format (something like "2020-05-09T05:00:00Z")? I…
Jack
  • 321
  • 2
  • 4
  • 17
0
votes
2 answers

How to run until some line in delve?

Say I have a code like this 362: => 363: for _, header := range MyHeaders { 364: b.applyHeader(header) 365: } 366: 367: if b.headers != nil { 368: req.Header = b.headers (dlv) I would like to skip the…
Hakan Baba
  • 1,897
  • 4
  • 21
  • 37
0
votes
1 answer

Debugging `dockerd` with `dlv` fails

I am trying to understand something inside dockerd using dlv debugger. Unfortunately, every time I am trying to do that I am facing errors. I can't do dlv exec nor dlv attach. The following diff shows some changes I applied to docker/docker to make…
mic4ael
  • 7,974
  • 3
  • 29
  • 42
0
votes
1 answer

Code display issue in Delve for Go on Windows 10

I've installed Delve on Windows 10 and it seems to work but the display does not show line numbers and does not point out the current line. According to the Delve "Getting Started" Guide I should see something like (dlv) continue > main.main()…
RedGrittyBrick
  • 3,827
  • 1
  • 30
  • 51
0
votes
1 answer

Debugging works in command line but breakpoint is not hit in UI

I have installed the following in my Windows 10 machine: VS Code - version 1.38.1 Golang - version go1.13 Delve - version 1.3.0 I have set GOROOT and GOPATH in environment variables. My GOPATH has the following three folders: src bin pkg Under…
MAK
  • 1,915
  • 4
  • 20
  • 44
0
votes
1 answer

How to build Kubernetes so debug information is included in executable files?

While trying to debug a panic in kubelet, I have been trying unsuccessfully to attach delve to kubelet executable: me@mycomputer:~$ sudo dlv attach 23796 could not attach to pid 23796: could not open debug info file and objdump --syms reveal no…
Dani
  • 19
  • 3
0
votes
1 answer

Set breakpoint by sourcefile in Delve

How can I set a breakpoint by sourcefile? I have the following code in a tmp.go file. package main func main() { a, b := 1, 2 c := a + b println(c) } This works $ dlv debug ./tmp.go (dlv) b main.main:1 Breakpoint 1 set at 0x105395d for…
Ben
  • 4,774
  • 5
  • 22
  • 26
0
votes
2 answers

Delve is not working during debugging golang in vs code

I am learning golang and try to debug a sample code which comes from one of my golang book. It is very strange that delve debugger is not working as expected. As you can see in this picture, I can set break point at line 83 and continue to run…
Jeffrey Yang
  • 41
  • 1
  • 6
0
votes
1 answer

dlv seg faulting inside alpine docker container

I am running dlv inside alpine:3.7.1 container. It is crashing with this error: / # /dlv --listen=:40000 --headless=true --api-version=2 exec /server Could not create config directory: user: Current not implemented on linux/amd64.panic: runtime…
user674669
  • 10,681
  • 15
  • 72
  • 105
0
votes
0 answers

Golang's Delve can't find packages located in parent folder

Problem: I'm using gb to build the project. It recursively checks all folders to get vendor, external and main.go files. Delve doesn't do this so when I ssh into the docker image and try to run the dlv server on the root of the project it says that…
Trody
  • 403
  • 5
  • 17
0
votes
2 answers

Golang Debugger Not Running

I am trying to set up VS Code with Go, and I am getting an error when attaching the debugger. Since I am brand new to VS Code, I have no leads as to why. I have installed delve debugger: go get -u github.com/derekparker/delve/cmd/dlv delv -v delv…
mornindew
  • 1,993
  • 6
  • 32
  • 54
0
votes
3 answers

GoLang debug console application

I am trying to debug this project I am using visual studio code, and have the Go extension setup. I am able to set a breakpoint in the main function and debug it, but I never see the visual command prompt. I used Delve, ran the exe that the project…
Matthew Mallimo
  • 361
  • 2
  • 8
0
votes
2 answers

How to debug RestApi deployed on local server using Vs code for Go Language

How to debug RestApi deployed on local server using Vs code for Go Language. I have gone through delve docs and made the settings. I have a local server, With java client i am trying to get the response. The localhost server is running on debug mode…