我正在尝试在Xcode中运行以下内容:
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
// NSLog(@"Hello, my name is Travis");
// NSString *firstName = @"Variable";
// NSLog(@"Hello, my name is %@", firstName);
// NSString *lastName = @"Last Name";
// NSLog((@"First name: %@, Last name: %@", firstName, lastName));
// NSNumber *age = @26;
// NSLog(@"%@ age is %@", firstName, age);
// NSArray *items = @[@"item1", @"item2", @"item3"];
// NSLog(@"%@",items[1]);
// NSLog(@"%@", [items description]);
// NSString *result = [items description];
// NSLog(result);
NSString *city = @"San Francisco";
NSUInteger cityLength = [city length];
NSLog(@"%lu", cityLength);
// NSMutableArray *mystr = [NSMutableArray arrayWithObjects:@"hello",@"world", nil];
// NSLog(@"%@", mystr[0]);
// NSString *me = @"FROM ME!";
// [mystr addObject: me];
// NSLog(@"%@", mystr[2]);
// NSDictionary *appRatings = @{@"item1": @4, @"item2": @3};
// NSLog(@"%@", [appRatings allKeys]);
// NSLog(@"%@", [appRatings objectForKey:@"item1"]);
// NSLog(@"%@", [appRatings allValues]);
// NSLog(@"%@", [appRatings valueForKey:@4]);
}
}
我只是想尝试运行未注释的代码。看似简单,应该只计算我的字符串变量中的字符数。当我运行它时,构建成功但没有任何东西放入控制台。唯一出现的是:(lldb)
答案 0 :(得分:2)
lldb表示代码在断点处暂停,正在等待lldb命令。禁用断点或查找并删除断点,然后重试。