I also found that naming the NSOperationQueue will not name the thread in Xcode during debugging.
Solution: Add an operation that sets the thread's name, and add it to the queue once after creating the queue.
NameThreadOperation.h
#import <Foundation/Foundation.h>
@interface NameThreadOperation : NSOperation
@end
NameThreadOperation.m
#import "NameThreadOperation.h"
@implementation NameThreadOperation
- (void)main
{
@autoreleasepool
{
[[NSThread currentThread] setName:@"Name of the thread"];
}
}
@end
In your ViewController.m or whatever:
operationQueue = [[NSOperationQueue alloc] init];
#if defined(DEBUG)
[self.operationQueue addOperation:[[NameThreadOperation alloc] init]];
#endif