diff --git a/install_gadget.py b/install_gadget.py index 20652e1..61241bd 100755 --- a/install_gadget.py +++ b/install_gadget.py @@ -84,10 +84,10 @@ GADGETS = { '${version}/${file_name}', }, 'all': { - 'version': '2019.5.17059', + 'version': '2019.10.41019', 'file_name': 'ms-python-release.vsix', 'checksum': - 'db31c9d835318209f4b26948db8b7c68b45ca4c341f6c17bb8e62dfc32f0b78d', + '38e8bf782fc6d2dc904868add2e1e5dc66197a06a902f6d17e15f96d4e9bf16b', }, 'adapters': { "vscode-python": { diff --git a/python3/vimspector/breakpoints.py b/python3/vimspector/breakpoints.py index 5525261..e511b09 100644 --- a/python3/vimspector/breakpoints.py +++ b/python3/vimspector/breakpoints.py @@ -272,6 +272,11 @@ class ProjectBreakpoints( object ): if exception_breakpoint_filters or not self._server_capabilities.get( 'supportsConfigurationDoneRequest' ): + # Note the supportsConfigurationDoneRequest part: prior to there being a + # configuration done request, the "exception breakpoints" request was the + # indication that configuraiton was done (and its response is used to + # trigger requesting threads etc.). See the note in + # debug_session.py:_Initialise for more detials exception_filters = [] if exception_breakpoint_filters: for f in exception_breakpoint_filters: diff --git a/python3/vimspector/debug_session.py b/python3/vimspector/debug_session.py index fe0873b..6804211 100644 --- a/python3/vimspector/debug_session.py +++ b/python3/vimspector/debug_session.py @@ -599,6 +599,21 @@ class DebugSession( object ): return [ command ] def _Initialise( self ): + # For a good explaination as to why this sequence is the way it is, see + # https://github.com/microsoft/vscode/issues/4902#issuecomment-368583522 + # + # In short, we do what VSCode does: + # 1. Send the initialize request and wait for the reply + # 2a. When we recieve the initialize reply, send the launch/attach request + # 2b. When we receive the initialized notification, send the breakpoints + # - if supportsConfigurationDoneRequest, send it + # - else, send the empty exception breakpoints request + # 3. When we have recieved both the receive the launch/attach reply *and* + # the connfiguration done reply (or, if we didn't send one, a response to + # the empty exception breakpoints request), we request threads + # 4. The threads response triggers things like scopes and triggers setting + # the current frame. + # def handle_initialize_response( msg ): self._server_capabilities = msg.get( 'body' ) or {} self._breakpoints.SetServerCapabilities( self._server_capabilities )