Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

debug - stopOnEntry not working #763

Closed
roblourens opened this issue Feb 2, 2017 · 3 comments
Closed

debug - stopOnEntry not working #763

roblourens opened this issue Feb 2, 2017 · 3 comments
Assignees
Labels

Comments

@roblourens
Copy link
Member

When I launch with "stopOnEntry": true, the debugger never pauses. Same on Mac and Windows. But I'm surprised that nobody has filed an issue on this. And there are even issues where people mention that they are using stopOnEntry successfully.

@roblourens
Copy link
Member Author

Debugging it, I see that we send an initial StoppedEvent, then vscode asks for the list of threads. We call ListGoroutines, Delve returns an empty list that we send back to vscode. Then that's it. It seems like Delve doesn't want to do anything unless we send a Continue command at startup.

@dibalavs
Copy link

dibalavs commented Oct 31, 2018

I have the same issue:
vscode: 1.82.2
delve debugger: 1.1.0
go extension: 0.6.93

When stopOnEntry == true, debugger freezes and do not do actual debugging.
Output from the log:

Verbose logs are written to:
/tmp/vscode-go-debug.txt
1:46:17 PM, 10/31/2018
InitializeRequest
InitializeResponse
Using GOPATH: /home/vdybala/go
Current working directory: /opt/work/aux/go-test
Running: /home/vdybala/go/bin/dlv debug --headless=true --listen=127.0.0.1:3550 --api-version=2 --log=true
API server listening at: 127.0.0.1:3550
time="2018-10-31T13:46:17+03:00" level=info msg="launching process with args: [/opt/work/aux/go-test/debug]" layer=debugger
InitializeEvent
SetBreakPointsRequest
All cleared
Creating on: /opt/work/aux/go-test/main.go:5
All set:[{"id":1,"name":"","addr":4830031,"file":"/opt/work/aux/go-test/main.go","line":5,"functionName":"main.main","Cond":"","continue":false,"traceReturn":false,"goroutine":false,"stacktrace":0,"LoadArgs":{"FollowPointers":true,"MaxVariableRecurse":1,"MaxStringLen":64,"MaxArrayValues":64,"MaxStructFields":-1},"LoadLocals":{"FollowPointers":true,"MaxVariableRecurse":1,"MaxStringLen":64,"MaxArrayValues":64,"MaxStructFields":-1},"hitCount":{},"totalHitCount":0}]
SetBreakPointsResponse
time="2018-10-31T13:46:17+03:00" level=info msg="created breakpoint: &api.Breakpoint{ID:1, Name:"", Addr:0x49b34f, File:"/opt/work/aux/go-test/main.go", Line:5, FunctionName:"main.main", Cond:"", Tracepoint:false, TraceReturn:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(0xc4201d08a0), LoadLocals:(*api.LoadConfig)(0xc4201d09c0), HitCount:map[string]uint64{}, TotalHitCount:0x0}" layer=debugger
ConfigurationDoneRequest
StoppedEvent("breakpoint")
ThreadsRequest
ThreadsRequest

@ramya-rao-a
Copy link
Contributor

Fixed with #2762
The fix is now available in the latest version of the update (0.11.7)

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants