Originally Posted by bsmorgan
I tried /dump C_TradeSkillUI in WoW but the <skipped 40> at the end doesn't help.
|
I found your post looking for roughly the same tradeskil api info, but I just want to make a suggestion that may help you in the future if you want more from /dump.
With the Blizzard_DebugTools addon loaded, the global variable DEVTOOLS_MAX_ENTRY_CUTOFF holds the limit of top level table entries to print, which is currently 30. If you want more than that out of /dump, you can manually change the limit by using /dump on anything once to load the addon then
/run DEVTOOLS_MAX_ENTRY_CUTOFF=100 or whatever you want the limit to be.
Here's the following relevant globals in Blizzard_DebugTools\Dump.lua:
Code:
DEVTOOLS_MAX_ENTRY_CUTOFF = 30; -- Maximum table entries shown
DEVTOOLS_LONG_STRING_CUTOFF = 200; -- Maximum string size shown
DEVTOOLS_DEPTH_CUTOFF = 10; -- Maximum table depth
DEVTOOLS_INDENT=' '; -- Indentation string
Something I've done to use /dump on local data within my personal addon, with "d" being the table I hold data:
Code:
SLASH_ZADDON1='/zao'
SlashCmdList['ZADDON']=function(args)
local arg1,arg2 = strsplit(' ',args)
UIParentLoadAddOn('Blizzard_DebugTools')
local max=DEVTOOLS_MAX_ENTRY_CUTOFF
arg2=arg2 or max
DEVTOOLS_MAX_ENTRY_CUTOFF=arg2
DevTools_Dump(d[arg1])
DEVTOOLS_MAX_ENTRY_CUTOFF=max
end
This prints out the table, or other object, of d[arg1]. For example, I have a table of all class names in d.class, so
/zao class 10 will print all but two classes, without the <skipped 2> message. Skipping the second argument, like
/zao class, will go with the default max of 30. DevTools_Dump is the main function of /dump, so arg1 could be anything that's not a toplevel local, as long as DevTools_Dump receives a table with what you want to dump as a key.
Printing out global objects simply requires _G:
Code:
SLASH_ZADDON1='/zao'
SlashCmdList['ZADDON']=function(args)
local arg1,arg2 = strsplit(' ',args)
UIParentLoadAddOn('Blizzard_DebugTools')
local max=DEVTOOLS_MAX_ENTRY_CUTOFF
arg2=arg2 or max
DEVTOOLS_MAX_ENTRY_CUTOFF=arg2
DevTools_Dump(_G[arg1])
DEVTOOLS_MAX_ENTRY_CUTOFF=max
end