Don't try to expand variables that are not expandable
This commit is contained in:
parent
b02d35e78d
commit
0a19048311
2 changed files with 17 additions and 8 deletions
|
|
@ -39,7 +39,7 @@ class DebugSession( object ):
|
|||
|
||||
self._uiTab = None
|
||||
self._threadsBuffer = None # TODO: Move to stack trace
|
||||
self._outputBuffer = None
|
||||
self._outputBuffer = None # TODO: Need something less terrible here
|
||||
self._stackTraceView = None
|
||||
self._variablesView = None
|
||||
|
||||
|
|
|
|||
|
|
@ -140,16 +140,25 @@ class VariablesView( object ):
|
|||
return
|
||||
|
||||
variable = self._line_to_variable[ current_line ]
|
||||
|
||||
if '_variables' in variable:
|
||||
# Collapse
|
||||
del variable[ '_variables' ]
|
||||
self._DrawScopesAndWatches()
|
||||
else:
|
||||
self._connection.DoRequest( partial( self._ConsumeVariables, variable ), {
|
||||
'command': 'variables',
|
||||
'arguments': {
|
||||
'variablesReference': variable[ 'variablesReference' ]
|
||||
},
|
||||
} )
|
||||
return
|
||||
|
||||
# Expand. (only if there is anything to expand)
|
||||
if 'variablesReference' not in variable:
|
||||
return
|
||||
if variable[ 'variablesReference' ] <= 0:
|
||||
return
|
||||
|
||||
self._connection.DoRequest( partial( self._ConsumeVariables, variable ), {
|
||||
'command': 'variables',
|
||||
'arguments': {
|
||||
'variablesReference': variable[ 'variablesReference' ]
|
||||
},
|
||||
} )
|
||||
|
||||
def _DrawVariables( self, variables, indent ):
|
||||
for variable in variables:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue