Hi guys, I wanted to know if there were any resources available for the use of Debugger. Every programmer has to go through different types of errors while writing large scripts. I generally use print statements for the conditional looping part but I sometimes feel that its not ideal and very time consuming. Any thoughts?
1 Like
Read the Developer Hub article if you haven’t already. Breakpoints are just often better than printing to the output because you can inspect the values of variables wherever you want easily. You should use it to debug most problems. The exception is that sometimes there’s code that’s running an annoying amount, such as code in a RunService RenderStepped listener, and you’d rather look at the output rather than breaking every second. The other time I prefer printing is when my threading code prevents the debugger from following through, and then instead I try to identify the problematic thread with printing and then return to using the debugger.
Set the breakpoint as late as you can in what you’re trying to debug to save time.
2 Likes