Wiki Targeted (Games)
Do you like this video?
Debugging is the act of checking and testing one's 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 debugging 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. For example, after starting a function you would write p
rint("Function started")or for a loop you would type
- 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.
Community content is available under CC-BY-SA unless otherwise noted.