14.10. Evaluate

The Evaluate panel is an inline Lua REPL against the paused state. The top half is an input editor; the bottom half is a read-only log of previous expressions and their results.

The panel is enabled only while the debugger is paused. Typical uses:

Scope. The evaluator runs against the paused state with the same custom _ENV as expression watches; bare identifiers resolve against locals, then upvalues, then globals (see Section 14.5, “Variables”). So pinfo.src works the same way Locals.pinfo.src works, and library names like string and tostring fall through to globals automatically.

Limitations.

After an evaluation the Stack Trace, Variables, and Watch panels are refreshed because the expression may have mutated state the other panels display.