- Home /
Unity3D 3.2, MonoDevelop debugger "inspector" problems
I'm using Unity3D 3.2 and MonoDevelop 2.4.2. When i launch Unity3D in debug mode with MonoDevelop and putting a breakpoint just after a List<> initialization (new List()), and hover the mouse pointer on the variable it says "Object reference not set to an instance of an object". Then if i add items in the List all works, but when i do something like this:
BaseUnit baseUnit = (BaseUnit)m_SelectedUnits[0].GetComponent(typeof(BaseUnit));
(BaseUnit is a MonoBehaviour i declared, m_SelectedUnits it is the list, List), and hover the mouse pointer on baseUnit it shows nothing, only the description of the variable.. this way i can't debug my problem, watching the properties of BaseUnit class etc. Is this normal? There's a way to solve?
Is the message about m_SelectedUnits, or m_SelectedUnits[0]? "new List" gives you a list with no items in it, so attempting to access element [0] will be an error. What if you look at things in the watch window rather than just mouse hover, do you get different info?
Same here, been using lots of Debug.Logs(). Unity, please look at this because we have a fairly large project to debug. The watch window in our case, gives you the same error msg. Unity 3D 3.2 does seem to be crashing quite a bit more than 3.1. Thanks for any updates.
The message is on m_SelectedUnits, in the watch window i have the same result, also if i put baseUnit (when the breakpoint is around the code where is declared/initialized) it says that baseUnit doesn't exist.
Answer by zink63 · Feb 16, 2011 at 07:01 PM
Same problem, list is gone..i feel its 3.2 but can this be a monodev bug? Unity please help...
Answer by Bovine · Feb 16, 2011 at 09:57 PM
This appears to be a mono develop issue, although there is some unqualified suggestion that this was fixed in 2.4.2..
But it's not like that.. since i have monodevelop 2.4.2... Also if you look the bug in the tracker it's a bit different from $$anonymous$$e. It's C# not C++ and it doesn't crash anything...
It might be C++ in the link but that doesn't mean it isn't related. If I run through the debugger in Unity mono stops and tells me that some of my references are null, when clearly they are not.
Answer by Tak · May 02, 2011 at 10:37 AM
This has been fixed in the edition of MonoDevelop shipped with Unity 3.3.
Your answer
Follow this Question
Related Questions
Rotation angles not corresponding (inspector, debugging) 0 Answers
How can I attach a debugger to the code running on the editor or to the builded client 3 Answers
iOS Debugger Problems 1 Answer
Use Visual Studio to debug Unity. Cannot connect to process 2 Answers
How does one inspect static vars? 3 Answers