Next: , Previous: , Up: Controlling bashdb   [Contents][Index]


4.14.3 Set/Show auto-eval (‘set autoeval’)

set autoeval [ on | 1 | off | 0 ]

Specify that debugger input that isn’t recognized as a command should be passed to Ruby for evaluation (using the current debugged program namespace). Note however that we first check input to see if it is a debugger command and only if it is not do we consider it as Ruby code. This means for example that if you have variable called n and you want to see its value, you could use p n, because just entering n will be interpreted as the debugger “next” command.

When autoeval is set on, you’ll get a different error message when you invalid commands are encountered. Here’s a session fragment to show the difference

bashdb<1> stepp
Unknown command
bashdb<2> set autoeval on
autoeval is on.
bashdb<3> stepp
NameError Exception: undefined local variable or method `stepp' for ...
show args

Shows whether Ruby evaluation of debugger input should occur or not.