local Debugger = require(game.ReplicatedStorage.Library.Debugger).new(script.Name);
--== Configuration;
--== Variables;
local player = game.Players.LocalPlayer;
local rootPart = script.Parent:WaitForChild("HumanoidRootPart"); -- StarterCharacterScript
local printTable = {Name="Creator"; Message="What do you think?"};
--== Script;
Debugger:Log("Debugger is running!", "MessageTable:", printTable);
Debugger:Warn("Warning message!")
Debugger.Disabled = true;
while wait(0.1) do
Debugger:Display({Position=tostring(rootPart.Position); Why="Useful for logging changing values."});
end
Debugger:Log(Tuple params) and Debugger:Warn(Tuple params)
bool Debugger.Disabled
Setting Debugger.Disabled to true will disable all logging and warnings for that script.
Debugger:Display(table t)
Nil values will not display. Currently Debugger:Display uses JSONEncode to display the table, any unsupported values should be converted to string first or else it will become nil.
Debugger seems a bit unlike what it actually does if it displays a few data types in a convenient manner. When you call it debugger I expected it to actually work with error handling, an overview of the current environment and perhaps stepping through code or similar functionality.
I agree that it’s actually surprisingly difficult to come up with a good name. I’d say something along the lines of ‘visual logger’ or similar, to emphasize how it visualises things that normally would be difficult to capture in text.
Yes, it was caused by not requiring the module on both server and client since it waits for a remote created on the server to send debugger data to the client.