Debug library members missing documentation

https://developer.roblox.com/en-us/api-reference/lua-docs/debug

The documentation of this page does not currently include setmemorycategory/resetmemorycategory from the memory use tracking update. Additionally, debug.info has no documentation.

6 Likes

yep, however it is documented in studio (some)
i’m gonna leave these here if you’re interested

debug.loadmodule(module: ModuleScript) → (()->() | nil)

// Returns ModuleScript’s executable closure that is ran on require.
P.S. (This is what I realized from testing)

debug.resetmemorycategory() → ()

// Resets the memory category tag of the current thread to the default auto-assigned tag that was based on script name.

debug.setmemorycategory() → ()

// Sets the memory category tag of the current thread. Future allocations performed by this thread will use this tag.

debug.dumpheap() → ()

// Can only be called from CommandBar. Saves a Luau heap to a (luauheap_%Y%m%d-%H%M%S.json) file.
P.S. (Found this in a Studio dump after searching for a bit)

2 Likes

Unsure when this happened, but it appears to now be somewhat documented. At long last, debug.info methods can actually be used without extensive testing to determine how they work!

Edit: Changed fully to somewhat, at least we have debug.info now!

4 Likes

I marked this as the solution but I checked and setmemorycategory still doesn’t exist on the page so I unmarked it. My primary request revolved around the memory debug members and then I only found out later that debug.info existed so edited it into the post.

It’s awesome that debug.info now has documentation though. :sunglasses:

2 Likes

Because they don’t have separate pages it seems to have caused the new release notes to link to a random website called debug.info

Standard libraries normally aren’t separated by their constants or methods so I’d wager this has more to do with the Release Notes generator. You can leave a message on the thread itself and a member of IX should be able to correct that so it points to the main page instead.

1 Like