Debugging
Debugging is the process of detecting, isolating, and fixing errors (bugs) in the code. This involves systematically testing where and why a program exhibits unexpected behavior, using tools such as debuggers, logging, and profilers. Efficient error detection speeds up the development process and is becoming increasingly important with the rise of LLMs in game development.
Starting Points
- IBM – What is debugging? - explanation of the debugging process and strategies
- Unity Manual – Debug C# code in Unity - instructions for using the Unity/Visual Studio debugger
Key Points
- You use a systematic problem-solving approach: forming hypotheses about the bug cause, performing targeted testing to confirm or refute these, and thus isolating and solving the bug root cause. Additionally, after fixing, you verify that the bug is actually gone and doesn't have an impact elsewhere.
- You effectively use debugging tools: set breakpoints, inspect variables during runtime, and step through the code to determine the cause of errors.