Only expand one inexpensive scope; codeLLDB lies about how expensive things are
This commit is contained in:
parent
0938d72a8c
commit
fc7725fefb
1 changed files with 6 additions and 2 deletions
|
|
@ -205,6 +205,7 @@ class VariablesView( object ):
|
||||||
def LoadScopes( self, frame ):
|
def LoadScopes( self, frame ):
|
||||||
def scopes_consumer( message ):
|
def scopes_consumer( message ):
|
||||||
new_scopes = []
|
new_scopes = []
|
||||||
|
expanded_some_scope = False
|
||||||
for scope_body in message[ 'body' ][ 'scopes' ]:
|
for scope_body in message[ 'body' ][ 'scopes' ]:
|
||||||
# Find it in the scopes list
|
# Find it in the scopes list
|
||||||
found = False
|
found = False
|
||||||
|
|
@ -221,9 +222,12 @@ class VariablesView( object ):
|
||||||
|
|
||||||
new_scopes.append( scope )
|
new_scopes.append( scope )
|
||||||
|
|
||||||
if not scope.scope.get( 'expensive' ) and not scope.IsCollapsedByUser():
|
# Expand the first non-expensive scope which is not manually collapsed
|
||||||
# Expand any non-expensive scope which is not manually collapsed
|
if ( not expanded_some_scope
|
||||||
|
and not scope.scope.get( 'expensive' )
|
||||||
|
and not scope.IsCollapsedByUser() ):
|
||||||
scope.expanded = True
|
scope.expanded = True
|
||||||
|
expanded_some_scope = True
|
||||||
|
|
||||||
if scope.IsExpandedByUser():
|
if scope.IsExpandedByUser():
|
||||||
self._connection.DoRequest( partial( self._ConsumeVariables,
|
self._connection.DoRequest( partial( self._ConsumeVariables,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue