My Advance Debugger


#1

What do you think of my advance debugger?

Example Script
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)

image

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.

https://i.gyazo.com/95ce74c80dfcbd12b4c6577f35549edc.mp4

Feel free to use it if you think it may be useful. It’s open source.

Update (03/02/2019)

• Fixed client side infinite yield for RemoteEvent.
• Added DocReader support.

Thanks for reading! ~MXKhronos


#2

This might belong more in community resources.


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.


#3

Oh, guess I may be naming it wrongly. Maybe… advance logger?

Not sure, since I might plan to add a Ray cast, Region3 visualizer.


#4

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.


#5

Looks like :Display() broke.


#6

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.

Should be fixed now.