Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Best practices of how to debug?

Asked by 8 years ago

I was wondering what were some of the best and most productive ways to debug. I was thinking something better than a simple thing like this.

script.Parent.MouseButton1Click:connect(function()
    print("Button was clicked.")
end)

So all in all, what is a great way to do that, and also more productive.

1 answer

Log in to vote
1
Answered by 8 years ago

What a great question. Debugging is the act using techniques and tools that provide more information about what went wrong. Roblox has provided several ways for us to do this. The best way I find to debug is to use Play Solo.

Play Solo

By activating play solo, you create a simulation of your game inside roblox studio. This is best for pulling out bugs while looking at your output. This allows you to get a nice debugging session in. By simply pressing that button you can find most of the bugs in you game.

Run Run is very similar to Play solo. Instead of creating a whole simulation, this simple creates the game instance and run all script and physics. This is AMAZING for debugging your code and even your building.

Logs Roblox automatically creates a logs for you. Whenever a script running on your computer prints or has an error, this message is recorded in a log file. These files are located in different places depending on the Operating System and usually in hidden folders. These are mostly things you look at whenever your studio crashes from a script.

Though roblox gave us these amazing things, you can always just look thoroughly at your code as you write. It also underlines words that are an error and gives you small comments in the corner of the window.

~~ Hope i helped, koolkid8099 Script On

Ad

Answer this question