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._uiTab = None
|
||||||
self._threadsBuffer = None # TODO: Move to stack trace
|
self._threadsBuffer = None # TODO: Move to stack trace
|
||||||
self._outputBuffer = None
|
self._outputBuffer = None # TODO: Need something less terrible here
|
||||||
self._stackTraceView = None
|
self._stackTraceView = None
|
||||||
self._variablesView = None
|
self._variablesView = None
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,16 +140,25 @@ class VariablesView( object ):
|
||||||
return
|
return
|
||||||
|
|
||||||
variable = self._line_to_variable[ current_line ]
|
variable = self._line_to_variable[ current_line ]
|
||||||
|
|
||||||
if '_variables' in variable:
|
if '_variables' in variable:
|
||||||
|
# Collapse
|
||||||
del variable[ '_variables' ]
|
del variable[ '_variables' ]
|
||||||
self._DrawScopesAndWatches()
|
self._DrawScopesAndWatches()
|
||||||
else:
|
return
|
||||||
self._connection.DoRequest( partial( self._ConsumeVariables, variable ), {
|
|
||||||
'command': 'variables',
|
# Expand. (only if there is anything to expand)
|
||||||
'arguments': {
|
if 'variablesReference' not in variable:
|
||||||
'variablesReference': variable[ 'variablesReference' ]
|
return
|
||||||
},
|
if variable[ 'variablesReference' ] <= 0:
|
||||||
} )
|
return
|
||||||
|
|
||||||
|
self._connection.DoRequest( partial( self._ConsumeVariables, variable ), {
|
||||||
|
'command': 'variables',
|
||||||
|
'arguments': {
|
||||||
|
'variablesReference': variable[ 'variablesReference' ]
|
||||||
|
},
|
||||||
|
} )
|
||||||
|
|
||||||
def _DrawVariables( self, variables, indent ):
|
def _DrawVariables( self, variables, indent ):
|
||||||
for variable in variables:
|
for variable in variables:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue