Lore archive · Warcraft Wiki, 2023 dump
API debuglocals
Last wiki revision 2023-04-19
Returns a string dump of all local variables and upvalues at a given stack level. locals = debuglocals([level])
- level: - The stack level to inspect. Defaults to 1 (the calling function).
- locals: - A string dump of all local variables, temporaries, and upvalues.
- This function will return no values if called outside of the execution of the global error handler function.
The following snippet demonstrates example output for a variety of values. Note that this snippet may not work as-is if you have an error handling addon installed, as these typically hijack and replace the ability to change the global error handler.
Number = 1.234560 String = "foo" NamedFrame = ChatFrame1 { 0 = <userdata> } Table = <table> { 1 = 1 2 = 2 3 = <table> { } foo = "bar" } Thread = <no value> Boolean = true Nil = nil Temp = "banana" (*temporary) = <function> defined @Interface\FrameXML\UIParent.lua:5234 Upvalue = "banana"
Source
https://warcraft.wiki.gg/wiki/API_debuglocals · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.