$Page Debugging $TargetName Debugging *Learning to debug patches* So far, the patches in these lessons have been carefully designed to behave predictably. However, when making a device of your own there will likely be times when a device doesn't behave as expected and you don't know why. *Note:* this lesson assumes you have followed the $Link Introduction . Debugging.png *Finding the cause of a bug* Finding the cause of a bug is often the biggest step toward fixing it. Max offers various tools for debugging, but as in any programming environment, using these tools effectively requires practice. This lesson covers some starting points: -> Test: use your device in different ways to find bugs -> Reproduce: find a way to consistently demonstrate a bug -> Isolate: find the simplest possible way to reproduce a bug -> Clean: clean the patch code to make it as easy to understand as possible -> Trace: follow the logic of your patch step-by-step to find out where it’s going wrong *Debugging is an art form* There’s more to debugging than what we can cover in this lesson, because there are many different scenarios and each one needs a different approach. The process of debugging is sometimes just as creative as making music. After the last step, continue to the $Link Final result