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 scopes_consumer( message ):
|
||||
new_scopes = []
|
||||
expanded_some_scope = False
|
||||
for scope_body in message[ 'body' ][ 'scopes' ]:
|
||||
# Find it in the scopes list
|
||||
found = False
|
||||
|
|
@ -221,9 +222,12 @@ class VariablesView( object ):
|
|||
|
||||
new_scopes.append( scope )
|
||||
|
||||
if not scope.scope.get( 'expensive' ) and not scope.IsCollapsedByUser():
|
||||
# Expand any non-expensive scope which is not manually collapsed
|
||||
# Expand the first 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
|
||||
expanded_some_scope = True
|
||||
|
||||
if scope.IsExpandedByUser():
|
||||
self._connection.DoRequest( partial( self._ConsumeVariables,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue