Debugging with MonoDevelop – getting started

Earlier, we encountered the Debug.Log method of debugging to print helper messages to the console at critical moments in the code to help us see how the program executes. This method, while functional, however, suffers some significant drawbacks. First off, when writing larger programs with many Debug.Log statements it's easy to effectively "spam" the console with excessive messages. This makes it difficult to differentiate between the ones you need and the ones you don't. Second, it's generally a bad practice to change your code by inserting the Debug.Log statements simply to monitor program flow and find errors. Ideally, we should be able to debug without changing our code. Therefore, we have compelling ...

Get Mastering Unity Scripting now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.