Deciphering Xcode output for debugging

Trying to debug a 'KeyNotFoundExeption error.

This is what I see in the XCode console.
Is the order of operations top down or bottom up?
Is there any way of determining exactly where in my code this is happening?

Please tell me I’m not the only one who is trying to debug without any line number references.
This is rediculous!

KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x00000] in <00000000000000000000000000000000>:0
at MeshClassificationManager.SetCurrentClassification (UnityEngine.XR.ARSubsystems.TrackableId meshID, System.Int32 triangleIndex) [0x00000] in <00000000000000000000000000000000>:0
at MeshClassificationManager.Update () [0x00000] in <00000000000000000000000000000000>:0

-Is the order of operations top down or bottom up?
It’s ‘inside-out’ when read top-to-bottom (as it is the editor)

  • debug without any line number references
    It’s annoying, but a ctrl-f makes it still fairly easy

So where’s the error?
The error is thrown in Dictionary[ ].get_Item(key)
Inside of MeshClassificationManager.SetCurrentClassification
Which is being called from MCM.Update

.get_Item() would be the representation for the indexing operator (dict[key])

I don’t have the script in front of me, but the key would normally be the TrackableId (i.e. the meshID). So there is an attempt to set a Classification on a Mesh that doesn’t exist?

1 Like

Great info. Thanks.