Enable the log#
Use the launch arguments below for script diagnostics. Find the log in the user profile actually used by the game process, especially with multiple test profiles. Add a distinctive debug_text marker in MD. Lua UI can use the game's DebugError where available; the example checks its event API prerequisite.
-debug scripts -logfile debuglog.txt<debug_text text="'WIKI: entered Read handler'" />if type(RegisterEvent) ~= "function" then
DebugError("[WIKI] UI event API unavailable")
return
endFour different failures#
| Stage | Check |
|---|---|
| Import | XML validity, schema, filename, dependencies |
| Event | screen/control names and callback registration time |
| Execution | Argument types, object existence and permissions |
| Result | Actual value, object, account or queue in game |
Do not log generic success immediately after sending an event. Use precise markers such as sent, received, validated, applied and readback_ok.
Collect one complete snapshot#
Read every required fact before reporting differences. Stopping at the first mismatch loses evidence about other objects and may force an unnecessary expensive rerun. The inspected UI environment lacked the standard Lua debug library; verify availability before depending on it. Short bounded entry/argument markers helped investigate map callbacks.