Skip to content

Commit 7a049d9

Browse files
committed
Fixes #196 - reorder messages to prevent dbgr fail to start
This commit sends the initialized event *after* the initializeRequest response (that sends capabilities info). This was recommended by @isidorn in issue http://github.com/Microsoft/vscode/issues/4567.
1 parent 7a32fa4 commit 7a049d9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/PowerShellEditorServices.Protocol/Server/DebugAdapterBase.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,18 @@ private async Task HandleInitializeRequest(
5454
object shutdownParams,
5555
RequestContext<InitializeResponseBody> requestContext)
5656
{
57-
// Send the Initialized event first so that we get breakpoints
58-
await requestContext.SendEvent(
59-
InitializedEvent.Type,
60-
null);
61-
6257
// Now send the Initialize response to continue setup
6358
await requestContext.SendResult(
64-
new InitializeResponseBody
65-
{
59+
new InitializeResponseBody {
6660
SupportsConfigurationDoneRequest = true,
6761
SupportsConditionalBreakpoints = true,
6862
SupportsFunctionBreakpoints = true
6963
});
64+
65+
// Send the Initialized event first so that we get breakpoints
66+
await requestContext.SendEvent(
67+
InitializedEvent.Type,
68+
null);
7069
}
7170
}
7271
}

0 commit comments

Comments
 (0)