Set Auto Eval

set autoeval [ on | off ]

Evaluate unrecognized debugger commands.

Often inside the debugger, one would like to be able to run arbitrary Python commands without having to preface Python expressions with print or eval. Setting autoeval on will cause unrecognized debugger commands to be eval’d as a Python expression.

Note that if this is set, on error the message shown on type a bad debugger command changes from:

Undefined command: "fdafds". Try "help".

to something more Python-eval-specific such as:

NameError: name 'fdafds' is not defined

One other thing that trips people up is when setting autoeval is that there are some short debugger commands that sometimes one wants to use as a variable, such as in an assignment statement. For example:

s = 5

which produces when autoeval is on:

Command 'step' can take at most 1 argument(s); got 2.

because by default, s is an alias for the debugger step command. It is possible to remove that alias if this causes constant problem.

See also

show autoeval