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.
Ctrl+Return (or click
Evaluate) to run it against the paused state. The evaluator
runs the code in a protected way, so runtime errors are caught
and reported in the output rather than terminating Wireshark.
= or return is needed — bare expressions auto-return
their value, the same way Watch rows do (see
Section 14.6, “Watch”). The legacy =expr prefix from older
Lua REPLs is still tolerated, just redundant.
The panel is enabled only while the debugger is paused. Typical uses:
pinfo.src, tostring(pinfo.dst), or
sessions[pinfo.number].
_G.my_flag = true, my_table.field = 99. (For
read-only observation prefer the Watch panel; expression
watches re-evaluate automatically on every pause without taking
up the Evaluate output history.)
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.
foo = 42 writes to _G.foo, not to a local foo. Use
debug.setlocal() if you really need to mutate a local.
while true do end
cannot hang the GUI. On Lua 5.3 builds the cap is inactive;
see the Expression watches section for details.
After an evaluation the Stack Trace, Variables, and Watch panels are refreshed because the expression may have mutated state the other panels display.