mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Fix #314: Occasional missing response to "configurationDone"
Don't treat missing response as error, but gracefully finalize the debug session instead.
This commit is contained in:
parent
be4c063719
commit
440587b261
1 changed files with 10 additions and 0 deletions
|
|
@ -211,6 +211,16 @@ class Client(components.Component):
|
|||
# to conform to the DAP spec, we'll need to defer waiting for response.
|
||||
try:
|
||||
self.server.channel.request(request.command, arguments)
|
||||
except messaging.NoMoreMessages:
|
||||
# Server closed connection before we could receive the response to
|
||||
# "configurationDone" - this can happen when debuggee exits shortly
|
||||
# after starting. It's not an error, but we can't do anything useful
|
||||
# here at this point, either, so just bail out.
|
||||
request.respond({})
|
||||
self.session.finalize(
|
||||
fmt('{0} disconnected before responding to "configurationDone"', self.server)
|
||||
)
|
||||
return
|
||||
except messaging.MessageHandlingError as exc:
|
||||
exc.propagate(request)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue