Allow setting the value via the api
This commit is contained in:
parent
49a9a4b367
commit
804b499286
4 changed files with 14 additions and 8 deletions
|
|
@ -526,8 +526,8 @@ class DebugSession( object ):
|
|||
self._variablesView.ExpandVariable( buf, line_num )
|
||||
|
||||
@IfConnected()
|
||||
def SetVariableValue( self, buf = None, line_num = None ):
|
||||
self._variablesView.SetVariableValue( buf, line_num )
|
||||
def SetVariableValue( self, new_value = None, buf = None, line_num = None ):
|
||||
self._variablesView.SetVariableValue( new_value, buf, line_num )
|
||||
|
||||
@IfConnected()
|
||||
def AddWatch( self, expression ):
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ class VariablesView( object ):
|
|||
},
|
||||
} )
|
||||
|
||||
def SetVariableValue( self, buf = None, line_num = None ):
|
||||
def SetVariableValue( self, new_value = None, buf = None, line_num = None ):
|
||||
variable: Variable
|
||||
view: View
|
||||
|
||||
|
|
@ -532,9 +532,10 @@ class VariablesView( object ):
|
|||
if not variable.IsContained():
|
||||
return
|
||||
|
||||
new_value = utils.AskForInput( 'New Value: ',
|
||||
variable.variable.get( 'value', '' ),
|
||||
completion = 'expr' )
|
||||
if new_value is None:
|
||||
new_value = utils.AskForInput( 'New Value: ',
|
||||
variable.variable.get( 'value', '' ),
|
||||
completion = 'expr' )
|
||||
|
||||
if new_value is None:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue