Update vscode-python and document the startup sequence, which is clearly broken in vscode-python
This commit is contained in:
parent
82e351454d
commit
a04dfcb4db
3 changed files with 22 additions and 2 deletions
|
|
@ -84,10 +84,10 @@ GADGETS = {
|
||||||
'${version}/${file_name}',
|
'${version}/${file_name}',
|
||||||
},
|
},
|
||||||
'all': {
|
'all': {
|
||||||
'version': '2019.5.17059',
|
'version': '2019.10.41019',
|
||||||
'file_name': 'ms-python-release.vsix',
|
'file_name': 'ms-python-release.vsix',
|
||||||
'checksum':
|
'checksum':
|
||||||
'db31c9d835318209f4b26948db8b7c68b45ca4c341f6c17bb8e62dfc32f0b78d',
|
'38e8bf782fc6d2dc904868add2e1e5dc66197a06a902f6d17e15f96d4e9bf16b',
|
||||||
},
|
},
|
||||||
'adapters': {
|
'adapters': {
|
||||||
"vscode-python": {
|
"vscode-python": {
|
||||||
|
|
|
||||||
|
|
@ -272,6 +272,11 @@ class ProjectBreakpoints( object ):
|
||||||
|
|
||||||
if exception_breakpoint_filters or not self._server_capabilities.get(
|
if exception_breakpoint_filters or not self._server_capabilities.get(
|
||||||
'supportsConfigurationDoneRequest' ):
|
'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 = []
|
exception_filters = []
|
||||||
if exception_breakpoint_filters:
|
if exception_breakpoint_filters:
|
||||||
for f in exception_breakpoint_filters:
|
for f in exception_breakpoint_filters:
|
||||||
|
|
|
||||||
|
|
@ -599,6 +599,21 @@ class DebugSession( object ):
|
||||||
return [ command ]
|
return [ command ]
|
||||||
|
|
||||||
def _Initialise( self ):
|
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 ):
|
def handle_initialize_response( msg ):
|
||||||
self._server_capabilities = msg.get( 'body' ) or {}
|
self._server_capabilities = msg.get( 'body' ) or {}
|
||||||
self._breakpoints.SetServerCapabilities( self._server_capabilities )
|
self._breakpoints.SetServerCapabilities( self._server_capabilities )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue