diff --git a/python3/vimspector/debug_adapter_connection.py b/python3/vimspector/debug_adapter_connection.py index 76f837f..af53b35 100644 --- a/python3/vimspector/debug_adapter_connection.py +++ b/python3/vimspector/debug_adapter_connection.py @@ -119,6 +119,6 @@ class DebugAdapterConnection( object ): message[ 'message' ] ) ) elif message[ 'type' ] == 'event': - method = '_OnEvent_' + message[ 'event' ] + method = 'OnEvent_' + message[ 'event' ] if method in dir( self._handler ) and getattr( self._handler, method ): getattr( self._handler, method )( message ) diff --git a/python3/vimspector/debug_session.py b/python3/vimspector/debug_session.py index fcb6fc7..41ded47 100644 --- a/python3/vimspector/debug_session.py +++ b/python3/vimspector/debug_session.py @@ -171,7 +171,7 @@ class DebugSession( object ): }, } ) - def _OnEvent_initialized( self, message ): + def OnEvent_initialized( self, message ): self._connection.DoRequest( None, { 'command': 'setFunctionBreakpoints', 'arguments': { @@ -186,14 +186,14 @@ class DebugSession( object ): } ) - def _OnEvent_output( self, message ): + def OnEvent_output( self, message ): with utils.ModifiableScratchBuffer( self._outputBuffer ): t = [ message[ 'body' ][ 'category' ] + ':' + '-' * 20 ] t += message[ 'body' ][ 'output' ].splitlines() self._outputBuffer.append( t, 0 ) - def _OnEvent_stopped( self, message ): + def OnEvent_stopped( self, message ): self._currentThread = message[ 'body' ][ 'threadId' ] def threads_printer( message ): diff --git a/python3/vimspector/variables.py b/python3/vimspector/variables.py index f5eba97..1d26b8f 100644 --- a/python3/vimspector/variables.py +++ b/python3/vimspector/variables.py @@ -23,9 +23,16 @@ class VariablesView( object ): def __init__( self, connection, buf ): self._buf = buf self._connection = connection - self._scopes = [] self._line_to_variable = {} + # This is actually the tree (scopes are alwyas the root) + # it's just a list of DAP scope dicts, with one magic key (_variables) + # _variables is a list of DAP variable with the same magic key + # + # If _variables is present, then we have requested and should display the + # children. Otherwise, we haven't or shouldn't. + self._scopes = [] + vim.current.buffer = buf vim.command( 'nnoremap :call vimspector#ExpandVariable()' )