Support the bash debugger
This required working around some sort of bug where the server returns an invalid content length. Either that or we are somehow processing the same message twice with additional escaping? It's really strange.
This commit is contained in:
parent
f53fb88503
commit
b6a9cba52e
5 changed files with 67 additions and 26 deletions
|
|
@ -293,7 +293,7 @@ class DebugSession( object ):
|
|||
self.SetCurrentFrame( None )
|
||||
|
||||
def SetCurrentFrame( self, frame ):
|
||||
self._codeView.SetCurrentFrame( frame )
|
||||
ret = self._codeView.SetCurrentFrame( frame )
|
||||
|
||||
if frame:
|
||||
self._variablesView.LoadScopes( frame )
|
||||
|
|
@ -302,6 +302,8 @@ class DebugSession( object ):
|
|||
self._stackTraceView.Clear()
|
||||
self._variablesView.Clear()
|
||||
|
||||
return ret
|
||||
|
||||
def _StartDebugAdapter( self ):
|
||||
self._logger.info( 'Starting debug adapter with: {0}'.format( json.dumps(
|
||||
self._adapter ) ) )
|
||||
|
|
@ -383,9 +385,15 @@ class DebugSession( object ):
|
|||
'command': 'initialize',
|
||||
'arguments': {
|
||||
'adapterID': adapter_config.get( 'name', 'adapter' ),
|
||||
'clientID': 'vimspector',
|
||||
'clientName': 'vimspector',
|
||||
'linesStartAt1': True,
|
||||
'columnsStartAt1': True,
|
||||
'locale': 'en_GB',
|
||||
'pathFormat': 'path',
|
||||
'supportsVariableType': True,
|
||||
'supportsVariablePaging': False,
|
||||
'supportsRunInTerminalRequest': True
|
||||
},
|
||||
} )
|
||||
|
||||
|
|
@ -407,18 +415,14 @@ class DebugSession( object ):
|
|||
|
||||
def OnEvent_initialized( self, message ):
|
||||
self._SendBreakpoints()
|
||||
self._connection.DoRequest( None, {
|
||||
'command': 'configurationDone',
|
||||
} )
|
||||
|
||||
self._stackTraceView.LoadThreads( True )
|
||||
self._connection.DoRequest(
|
||||
lambda msg: self._stackTraceView.LoadThreads( True ),
|
||||
{
|
||||
'command': 'configurationDone',
|
||||
}
|
||||
)
|
||||
|
||||
def OnEvent_thread( self, message ):
|
||||
if message[ 'body' ][ 'reason' ] == 'started':
|
||||
pass
|
||||
elif message[ 'body' ][ 'reason' ] == 'exited':
|
||||
pass
|
||||
|
||||
self._stackTraceView.OnThreadEvent( message[ 'body' ] )
|
||||
|
||||
def OnEvent_breakpoint( self, message ):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue