Closed adospace closed 5 years ago
@adospace Thanks for pointing this out. According to specification launch
request should come after configurationDone
, however VSCode does it the other way around - it sends launch
request, sets breakpoints and only then issues the configurationDone
command.
I guess netcoredbg
should support both variants :smile:
@ayuckhulk ah ok, thanks for the explanation
According to official specifications (https://microsoft.github.io/debug-adapter-protocol/overview) debugger should accept first 'configurationDone' request and then 'launch' request.
From my tests seems that I need to send the 'launch' request before 'configurationDone' request to correctly start the debugger.
This is the sequence of configurationDone first and getting an error:
->
{"command":"initialize","seq":1,"type":"Request"}
<-{"body":{},"event":"initialized","seq":1,"type":"event"}
<-{"body":{"supportTerminateDebuggee":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true},"command":"initialize","request_seq":1,"seq":2,"success":true,"type":"response"}
->{"command":"configurationDone","seq":2,"type":"Request"}
<-{"command":"configurationDone","message":"Failed command 'configurationDone' : 0x80004005","request_seq":2,"seq":3,"success":false,"type":"response"}
->{"arguments":{},"command":"launch","seq":3,"type":"Request"}
<-{"body":{},"command":"launch","request_seq":3,"seq":4,"success":true,"type":"response"}
while sending 'launch' before 'configurationDone' works fine:
->
{"command":"initialize","seq":1,"type":"Request"}
<-{"body":{},"event":"initialized","seq":1,"type":"event"}
<-{"body":{"supportTerminateDebuggee":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true},"command":"initialize","request_seq":1,"seq":2,"success":true,"type":"response"} {"arguments":{},"command":"launch","seq":2,"type":"Request"}
<-{"body":{},"command":"launch","request_seq":2,"seq":3,"success":true,"type":"response"} {"command":"configurationDone","seq":3,"type":"Request"}
<-{"body":{},"command":"configurationDone","request_seq":3,"seq":4,"success":true,"type":"response"}
<-{"body":{"module":{"id":"341dfe22-562e-4db3-8729-b233a8cd1a5f","name":"System.Private.CoreLib.dll","path":"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\2.1.6\\System.Private.CoreLib.dll","symbolStatus":"Skipped loading symbols."},"reason":"new"},"event":"module","seq":5,"type":"event"}
....Is there any error on my side?