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,10 +140,19 @@ 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
|
||||||
|
|
||||||
|
# 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 ), {
|
self._connection.DoRequest( partial( self._ConsumeVariables, variable ), {
|
||||||
'command': 'variables',
|
'command': 'variables',
|
||||||
'arguments': {
|
'arguments': {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue