The information on this page is outdated and needs to be updated.
Debugging is the act of checking and testing your code for errors. It is often the most important step and should be performed regularly.
Types of Debugging:
- Debug enhancement: Roblox has a built-in debug system that can be used. More information here.
- Print debugging: Using the method
print()of the global namespace, you put a print after each line of code you think is causing a problem. Where it stops printing is where you're blocked.
- Verbose debugging: This method shows tons of output that tells the scripter what variables are set to, why loops ended and when functions stopped. This is generally the easiest way to debug.
- Live debugging: This consists of running your script on a script builder or Roblox Studio environment to draw out errors. To test this way you must deliberately try to cause scripting errors. A good way to do this is to use the Developer Console to run commands.