roact icon indicating copy to clipboard operation
roact copied to clipboard

'Trace mode': Log all Roblox object mutations

Open LPGhatguy opened this issue 7 years ago • 3 comments

We're finding an awesome amount of bugs with Roblox UI objects due to some projects being written using Roact. However, diagnosing the real problems with them is tricky because Roact obfuscates a lot of the actual behavior under the hood (on purpose!)

It would be useful from both a performance and debugging perspective to have a verbose logging mode for Roact to output virtual tree diffs, Roblox object mutations, and other performance notes.

LPGhatguy avatar Feb 16 '18 03:02 LPGhatguy

Should this be enabled with DEBUG_ENABLE() or should it be a separate function?

AmaranthineCodices avatar Mar 04 '18 16:03 AmaranthineCodices

This should be a separate function. Right now, DEBUG_ENABLE() is targeted at regular Roact users, but this is basically intended for debugging Roact and Roblox themselves.

LPGhatguy avatar Mar 05 '18 00:03 LPGhatguy

I've got a branch for logging actual mutations to Roblox objects; a question has come up: should this also log instance creation/destruction?

AmaranthineCodices avatar Mar 19 '18 23:03 AmaranthineCodices