Debugging With MonoDevelop

Mike Talbot · 22K views · 2012 · 11:37

Open on YouTube

Testing, debugging & developer toolsGame programming & enginestutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering Unity beginners who need to learn how to attach MonoDevelop to the editor and step through their scripts instead of guessing at bugs.

Recommended by 2 people across 2 different months, 2014 to 2014.

What it is

An 11-minute tutorial from UnityGems showing how to debug Unity games with MonoDevelop. It covers setting breakpoints and attaching the debugger to the running Unity Editor so you can step through code.

What people said

Recommends Dayan · 2014-03 · Stack Overflow · on “String reader only work 1 time”

If you check the following line: TextAsset mapDataStream = (TextAsset)Resources.Load(map.mapName, typeof(TextAsset)); By debugging your code; step through the code line by line. Determine if mapDataStream is ever NULL because if it is, the next line of code will throw a NullReferenceException because you attempt to read a property of a null object. In Mono you can follow their guide for debugging to easily step through your code and identify problems. Refer to this link [LINK] Its as simple as putting a break point on the line you wish to debug: Open your project in Mono Develop. hit play in the Unity Editor. In Mono Develop select run attach to process... and select unity editor. You can no

Recommends Sergey Krusch · 2014-05 · Stack Overflow · on “how can i compare the positions of clones?”

Look, man. Your problem is not in "comparing clones". And not in any questions that you have already asked here. Your main problem is that you seem to not understand how your code does work and how it should work. Learn how to debug programs. Familiarize yourself with Debug.Log [LINK] and console [LINK] . Learn how to use the debugger. Is is a very powerful tool. Go through this video tutorial: [this video] Be patient. Maybe it will take you a day or two to get use to these. But it will give you more than asking even a 1000 questions here on stack overflow.

Cites Formic · 2014-06 · Stack Overflow · on “Unity3d C# -> generating a perlin noise texture with layers”

It is included with monodevelop (you actually can't use Visual studio currently) Just hit the big play button in the top left and attach to the unity process. Here is a random video on youtube demonstrating a guy using it: [this video]