diff --git a/python3/vimspector/stack_trace.py b/python3/vimspector/stack_trace.py index aefb74d..4358e94 100644 --- a/python3/vimspector/stack_trace.py +++ b/python3/vimspector/stack_trace.py @@ -62,6 +62,10 @@ class StackTraceView( object ): def consume_threads( message ): self._threads.clear() + if not message[ 'body' ][ 'threads' ]: + # This is a protocol error. It is required to return at least one! + raise ValueError( 'Server returned no threads. Is it running?' ) + for thread in message[ 'body' ][ 'threads' ]: self._threads.append( thread ) diff --git a/python3/vimspector/variables.py b/python3/vimspector/variables.py index de53f48..c83bf44 100644 --- a/python3/vimspector/variables.py +++ b/python3/vimspector/variables.py @@ -179,7 +179,7 @@ class VariablesView( object ): '_variables' not in variable ) else '-', name = variable[ 'name' ], type_ = variable.get( 'type', '' ), - value = variable[ 'value' ] ).split( '\n' ) ) + value = variable.get( 'value', '' ) ).split( '\n' ) ) if '_variables' in variable: self._DrawVariables( variable[ '_variables' ], indent + 2 )