O'Reilly logo

Mastering Unity Scripting by Alan Thorn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging with MonoDevelop – tracepoints

Tracepoints can offer you a neater alternative to using Debug.Log statements that, as we've seen, force us to amend the code we're debugging. Tracepoints work like breakpoints, in that they mark lines within your source file. They don't change the code itself, but (unlike breakpoints) they don't pause the program execution when encountered by the debugger. Instead, they perform a specified instruction automatically. Typically, they print a debug statement to the Application Output window in MonoDevelop, though not to the Unity's Console. To set a breakpoint in line 16 of code sample 2-10, position your cursor on line 16 and select Add Tracepoint in Run from the application menu (or press Ctrl + Shift + ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required