Strange descriptions for arrays in the Xcode debugger

When debugging my program in the Xcode debugger, if I hover over an array variable, the Xcode debugger was used to show me how many objects were in the array, and I could even examine the objects themselves.

Somewhere along the line, this functionality was broken, and now it just says that there are “-1812597152 objects” in all my arrays, and I do not have access to individual objects.

Does anyone know what went wrong? or better yet, how to fix it?


Edit:

This happens for all arrays, so I don't think this is a persistence problem.

I checked custom data views with no luck. Sorry, moving the plist in

~ / Library / Application Support / Apple / Developer Tools / CustomDataViews /

had no effect and in

there were no files.

~ / Library / Application Support / Developer / General / Xcode / CustomDataViews /

And here is the entry for arrays in /Developer/Library/Xcode/CustomDataViews/Foundation.plist

<key>NSArray *</key>
<dict>
    <key>SummaryString</key>
    <string>{(int)[$VAR count]} objects</string>
</dict>

Which looks pretty good to me.

+3
source share
3 answers

It looks like the array you are trying to view is out of scope. This sometimes happens if you set a breakpoint in the last line of the function, because the compiler can optimize this line and clear local objects. If so, other objects, such as NSStrings, will also be unavailable.

, , , . , , - .

, !

+2

: @Ben, , . , , ( -dealloc GC), , , .

, , plist :

~/Library/Application Support/Developer/Shared/Xcode/CustomDataViews/

(, Xcode):

~/Library/Application Support/Apple/Developer Tools/CustomDataViews/

CustomDataViews.plist, , , . , - , ( ), , .

+1

, , Data Formatters, Run- > Variables View- > Enable Data Formatters.

This completely disables the formatting of user data and therefore should exclude them from further consideration if it does not affect the display.

(sorry, no comments yet)

+1
source

Source: https://habr.com/ru/post/1712063/


All Articles