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
5
votes
4 answers

Run and Debug unit tests with flags

I want to be able to run and debug unit tests within VS Code using the test explorer or code lens. But in order to run my tests, I need to add this flag: -ldflags "-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn" Therefore,…
ravi kumar
  • 1,548
  • 1
  • 13
  • 47
5
votes
0 answers

How to handle stdin/stdout with dlv

I am using Delve to debug and having issues with the best way to handle stdin/stdout. The first problem is that I cannot read the console. I have a function that takes use onput from the console: func readConsole() string { reader :=…
Bryon
  • 939
  • 13
  • 25
5
votes
1 answer

Debugging go in vscode doesn't stop at breakpoints, says "Could not find file ..." when debugger starts

Ubuntu. vscode 1.62.1. go1.17.3. vscode go extension v0.29.0. delve v1.7.1. I'm new to vscode and Go. I have many years of experience debugging Java apps in Eclipse. I've constructed a small multi-module Go app. I can set a breakpoint in main and…
David M. Karr
  • 14,317
  • 20
  • 94
  • 199
5
votes
3 answers

Access denied when launching VScode Go code both running without debugging and with debugging

I'm trying to setup a new Windows dev machine for Go and what is usually a pretty simple process has been met with a lot of headaches. When I try to run without debugging I get the following error: fork/exec…
luepin
  • 51
  • 1
  • 3
5
votes
2 answers

Breakpoints in vscode (Win 10) "unverified" and not hit when remote debugging Go app in Linux Docker container (Hyper-V)

I am developing a Go (1.12.0) api-server using vscode (1.34.0 insider and stable builds) for Windows 10. The source code is located on the Windows machine in the defined %GOPATH%. Delve (dlv.exe - version 1.2.0) is also installed in %GOPATH%\bin and…
joedoe150
  • 103
  • 1
  • 10
5
votes
0 answers

how to disable breakpoints when debugging go program in dlv(delve) like using gdb?

When using gdb to debugging go program, we can disable all breakpoints by using 'disable' command, and then we can 'enable' breakpoints if we need. But when using dlv(delve), i'm not found command like 'disable' in gdb, I can only use 'clear' or…
5
votes
0 answers

IntelliJ 2017.1.2 GOLANG debug does not work on breakpoints in packages

My application is made up of one main.go file and a handful of packages. When hitting breakpoints within the main.go, IntelliJ works as expected, showing variable values etc., however, when a breakpoint is set in a different package - aside from it…
user1007231
  • 133
  • 7
5
votes
1 answer

How to get a user's skills from Microsoft Delve

I am trying to retrieve the skills that are visible on a user's profile in Microsoft Delve, inside of Office 365. It looks like this on the delve web app: I want to read the skills from a user's profile in our organization. Furthermore I want to…
user4344677
5
votes
5 answers

How to fix delve "can't load package: package internal" error

So I installed VSCODE on my windows machine as my main golang IDE and I guess my overall lack of go knowledge is making me experience this seemingly unsolvable error: I installed delve and wanted to use it as my debugger in vscode-go. I did…
grssn
  • 526
  • 6
  • 8
5
votes
2 answers

Debugging GO on VSCode using Delve

I want to debug GoLang on VSCode editor. In their documentation they say it is possible. I am following the following Link to install the debugging features on the IDE. https://marketplace.visualstudio.com/items?itemName=lukehoban.Go And to install…
Shehan Tis
  • 177
  • 2
  • 13
4
votes
1 answer

Delve not installing in docker container

I'm trying to get delve installed in my docker container for debugging Go applications. In my Dockerfile I put: RUN go get github.com/go-delve/delve/cmd/dlv But when I enter the docker container and run dlv it says bash: dlv: command not found I…
Chris
  • 4,277
  • 7
  • 40
  • 55
4
votes
0 answers

Golang delve debuuger not working on windows 10

I have installed Golang and VS code and when i'm trying to debug the code using F5, i'm getting below error on debug console. I also tried to switch debug-adapter to legacy but still no luck. Is there anything being missed in setup Starting:…
suresh rajput
  • 169
  • 2
  • 9
4
votes
1 answer

VS Code - Go debug error - Could not launch process: fork/exec - Access Denied

I have done a fresh installation of VS code and trying to debug a go Code. I am able to run the "go run main.go" command and getting the correct result. However, I am getting the below error while trying to debug the code. I am not able to find any…
Rahul Satal
  • 2,107
  • 3
  • 32
  • 53
4
votes
1 answer

What OS signal does the vscode-go debugger send to delve-dap when I terminate debugging

I want to capture the OS signal and do some exit jobs when I terminate the vscode golang debugger. I have code as below: sigalChan := make(chan os.Signal, 1) signal.Notify(sigalChan, syscall.SIGINT, syscall.SIGTERM) <-sigalChan doSomeJobs() but it…
4
votes
1 answer

GOlang core dump analysis using delve throws error 'unrecognized core format'

Iam trying to analyse core file of GO program generated by gcore using delve. Below are steps I have followed. I got Unrecognized format error $go version go version go1.13.1 darwin/amd64 $/Users/sudhakar/go/bin/dlv version Delve Debugger Version:…
Sudhakar MNSR
  • 594
  • 1
  • 3
  • 17
1 2
3
13 14