Skip to content

Breakpoints not working. (linux) #3910

@GAZ082

Description

@GAZ082

Hey there. Stopped for a few weeks working on a Go project and when I returned to it noticed that when debugging the breakpoints do not work. I tested in a separate package a simple hello world program and when hit "debug test" in the generated test function for a fraction of a second the red got goes black and that's it.

VSCODE

Version: 1.105.1
Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084
Date: 2025-10-14T22:33:36.618Z
Electron: 37.6.0
ElectronBuildId: 12502201
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Linux x64 6.17.6-arch1-1

GO

go version go1.25.3 X:nodwarf5 linux/amd64

Delve Debugger

Version: 1.25.2
Build: $Id: af3df277866d7175e816eab14e56611053d4cdea $

Output

DAP server listening at: 127.0.0.1:36631
2025-11-02T11:19:34-03:00 debug layer=dap DAP server pid = 78332
2025-11-02T11:19:34-03:00 debug layer=dap DAP connection 1 started
2025-11-02T11:19:34-03:00 debug layer=dap [<- from client]{"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"go","locale":"en","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"supportsMemoryReferences":true,"supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryEvent":true,"supportsArgsCanBeInterpretedByShell":true,"supportsStartDebuggingRequest":true}}
2025-11-02T11:19:34-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsRestartRequest":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsLogPoints":true,"supportsDisassembleRequest":true,"supportsClipboardContext":true,"supportsSteppingGranularity":true,"supportsInstructionBreakpoints":true}}
2025-11-02T11:19:34-03:00 debug layer=dap [<- from client]{"seq":2,"type":"request","command":"launch","arguments":{"name":"Launch","type":"go","request":"launch","mode":"test","program":".","logOutput":"dap","showLog":true,"stopOnEntry":true,"__configurationTarget":6,"packagePathToGoModPathMap":{"/tmp/gotest":"/tmp/gotest"},"debugAdapter":"dlv-dap","showRegisters":false,"showGlobalVariables":false,"substitutePath":[],"dlvFlags":[],"hideSystemGoroutines":false,"dlvToolPath":"/home/gabriel/go/bin/dlv","env":{"GOPATH":"/home/gabriel/go"},"__buildDir":"/tmp/gotest","__sessionId":"0df5020f-f7c0-45a3-b6cf-1f05ab994f87"}}
2025-11-02T11:19:34-03:00 debug layer=dap parsed launch config: {
	"mode": "test",
	"program": ".",
	"buildFlags": {},
	"env": {
		"GOPATH": "/home/gabriel/go"
	},
	"stopOnEntry": true,
	"backend": "default",
	"stackTraceDepth": 50
}
2025-11-02T11:19:35-03:00 debug layer=dap building from "/tmp/gotest": [go test -c -o /tmp/gotest/__debug_bin1594438261 -gcflags all=-N -l .]
2025-11-02T11:19:35-03:00 debug layer=dap launching binary '/tmp/gotest/__debug_bin1594438261' with config: {
	"mode": "test",
	"program": "/tmp/gotest",
	"cwd": "/tmp/gotest",
	"buildFlags": {},
	"output": "/tmp/gotest/__debug_bin1594438261",
	"dlvCwd": "/tmp/gotest",
	"env": {
		"GOPATH": "/home/gabriel/go"
	},
	"stopOnEntry": true,
	"backend": "default",
	"stackTraceDepth": 50
}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"process","body":{"name":"/tmp/gotest/__debug_bin1594438261","systemProcessId":79109,"isLocalProcess":true,"startMethod":"launch"}}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"initialized"}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":2,"success":true,"command":"launch"}
2025-11-02T11:19:35-03:00 debug layer=dap [<- from client]{"seq":3,"type":"request","command":"setBreakpoints","arguments":{"source":{"name":"main.go","path":"/tmp/gotest/main.go"},"breakpoints":[{"line":4},{"line":5}],"lines":[4,5]}}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":3,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"verified":true,"source":{"name":"main.go","path":"/tmp/gotest/main.go"},"line":4},{"id":2,"verified":true,"source":{"name":"main.go","path":"/tmp/gotest/main.go"},"line":5}]}}
2025-11-02T11:19:35-03:00 debug layer=dap [<- from client]{"seq":4,"type":"request","command":"setFunctionBreakpoints","arguments":{"breakpoints":[]}}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":4,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
2025-11-02T11:19:35-03:00 debug layer=dap [<- from client]{"seq":5,"type":"request","command":"setInstructionBreakpoints","arguments":{"breakpoints":[]}}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":5,"success":true,"command":"setInstructionBreakpoints","body":{"breakpoints":[]}}
2025-11-02T11:19:35-03:00 debug layer=dap [<- from client]{"seq":6,"type":"request","command":"configurationDone"}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"stopped","body":{"reason":"entry","threadId":1,"allThreadsStopped":true}}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Type 'dlv help' for list of commands.\n"}}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":6,"success":true,"command":"configurationDone"}
Type 'dlv help' for list of commands.
2025-11-02T11:19:35-03:00 debug layer=dap [<- from client]{"seq":7,"type":"request","command":"threads"}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":7,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"Dummy"}]}}
2025-11-02T11:19:35-03:00 debug layer=dap [<- from client]{"seq":8,"type":"request","command":"threads"}
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":8,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"Dummy"}]}}
2025-11-02T11:19:35-03:00 debug layer=dap [<- from client]{"seq":9,"type":"request","command":"stackTrace","arguments":{"threadId":1,"levels":1}}
2025-11-02T11:19:35-03:00 debug layer=dap Unable to produce stack trace: unknown goroutine 1
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":9,"success":false,"command":"stackTrace","message":"Unable to produce stack trace","body":{"error":{"id":2004,"format":"Unable to produce stack trace: unknown goroutine 1","showUser":false}}}
2025-11-02T11:19:35-03:00 debug layer=dap [<- from client]{"seq":10,"type":"request","command":"stackTrace","arguments":{"threadId":1,"levels":20}}
2025-11-02T11:19:35-03:00 debug layer=dap Unable to produce stack trace: unknown goroutine 1
2025-11-02T11:19:35-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":10,"success":false,"command":"stackTrace","message":"Unable to produce stack trace","body":{"error":{"id":2004,"format":"Unable to produce stack trace: unknown goroutine 1","showUser":false}}}
2025-11-02T11:19:36-03:00 debug layer=dap [<- from client]{"seq":11,"type":"request","command":"stackTrace","arguments":{"threadId":1,"levels":19}}
2025-11-02T11:19:36-03:00 debug layer=dap Unable to produce stack trace: unknown goroutine 1
2025-11-02T11:19:36-03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":11,"success":false,"command":"stackTrace","message":"Unable to produce stack trace","body":{"error":{"id":2004,"format":"Unable to produce stack trace: unknown goroutine 1","showUser":false}}}```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions