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

fix stopOnEntry #2762

Merged
merged 2 commits into from
Sep 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,6 @@
"description": "Indicates local or remote debugging. Local maps to the dlv 'attach' command, remote maps to 'connect'.",
"default": "local"
},
"stopOnEntry": {
"type": "boolean",
"description": "Automatically stop program after launch.",
"default": false
},
"showLog": {
"type": "boolean",
"description": "Show log output from the delve debugger.",
Expand Down
6 changes: 4 additions & 2 deletions src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -823,9 +823,8 @@ class GoDebugSession extends LoggingDebugSession {

protected async configurationDoneRequest(response: DebugProtocol.ConfigurationDoneResponse, args: DebugProtocol.ConfigurationDoneArguments): Promise<void> {
log('ConfigurationDoneRequest');

if (this.stopOnEntry) {
this.sendEvent(new StoppedEvent('breakpoint', 0));
this.sendEvent(new StoppedEvent('breakpoint', 1));
log('StoppedEvent("breakpoint")');
this.sendResponse(response);
} else {
Expand Down Expand Up @@ -1003,6 +1002,9 @@ class GoDebugSession extends LoggingDebugSession {
goroutine.userCurrentLoc.function ? goroutine.userCurrentLoc.function.name : (goroutine.userCurrentLoc.file + '@' + goroutine.userCurrentLoc.line)
)
);
if (threads.length === 0) {
threads.push(new Thread(1, 'Dummy'));
}
response.body = { threads };
this.sendResponse(response);
log('ThreadsResponse', threads);
Expand Down