Xcode 7/8: Step-Over actually steps-into fast enumeration collections

Originator:markd
Number:rdar://27267291 Date Originated:7/10/2016
Status:Open Resolved:
Product:Developer Tools Product Version:Version 8.0 beta 2 (8S162m)
Classification:Serious Bug Reproducible:Always
 
Summary:
I was happily stepping-over code ("n" in the lldb console, the "step over" button too). This works fine, except for stepping over a `for (blah in [self someCollection])`  Xcode steps _in_ to the `someCollection` method.  This could be a three liner, or it could be something very complex - but definitely a distraction from what I was wanting to do (which was not to step through known-working code)

Video attached.

Happens in Xcode 7.3 family and Xcode 8b2

Steps to Reproduce:
1. Here's some code.  You won't run it, but it's the same that's in the video.

- (BOOL) isValidNoteForTie: (MJNote *) note {
    BOOL isValid = NO;

    MJSlot *nextSlot = note.slot.nextSlot;
    if (nextSlot == nil || nextSlot.type == kRestSlot) {
        isValid = NO;
    }

    // ties can only connect to same pitch
    for ( MJNote *nextNote in nextSlot.notes ) {
        if ( note.midiNote == nextNote.midiNote ) {
            isValid = YES;
            break;
        }
    }


I happily step over lines of code starting 'isValid" and over the if statement.

2. I step over the for loop
 

Expected Results:
3. I step over the for loop

Actual Results:
3. I step in to the implementation of -[MJSlot notes], which is more than just a simple property, because reasons.

Version:
Version 7.3 (7D175)
Version 8.0 beta 2 (8S162m)
10.11.5 (15F34)


Notes:
It's really not that big a deal - just suck it up and slog through an uninteresting method, but
when it happens day-in, day-out, it's just another heavy-sigh
death-of-a-thousand-cuts that makes using Xcode unpleasant.



Configuration:


Attachments:
'loopinzee.mp4' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!