Ios 在xcode 6中实现类时的运行时返回(lldb)

Ios 在xcode 6中实现类时的运行时返回(lldb),ios,function,class,xcode6,lldb,Ios,Function,Class,Xcode6,Lldb,正在运行 @interface Operation : NSObject -(float)addition:(float)number1 plusWith:(float)number2; @end 正在运行 #import "Operation.h" @implementation Operation -(float)addition:(float)number1 plusWith:(float)number2 { return number1 + number2; } @end 在

正在运行

@interface Operation : NSObject
-(float)addition:(float)number1 plusWith:(float)number2;
@end
正在运行

#import "Operation.h"
@implementation Operation
-(float)addition:(float)number1 plusWith:(float)number2 {
    return number1 + number2;
}
@end
在ViewController.m中

#import "Operation.h"
- (void)viewDidLoad {
    [super viewDidLoad];
Operation *Math = [[Operation alloc] init];
    float doPlus = [Math addition:3.0 plusWith:4.0];
    NSLog(@"%f + %f = %f",3.0,4.0,doPlus);
}
为什么运行时只返回(lldb)?我的错误在哪里? 我的调试区域:
您的代码中没有错误。代码停止的原因是您在此行中放置了断点:

return number1 + number2;
断点的意思是“停在这里”。调试器在那里停止,因为断点会告诉它这样做


因此,您可以删除断点,或者,当调试器在断点处停止时,您可以告诉它从该点恢复运行。

当调试器在(lldb)处停止时,我将获得输出| 3.000000+4.000000=7.000000键入命令“bt”并将它打印的内容粘贴到您的问题中。
thread info
bt
都会很有启发性。@AshishKakkad-谢谢您的提及,但这太神奇了@菲利普·米尔斯和罗布:谢谢你的回复!我已将调试区域映像添加到问题中。以下是我对断点和Xcode调试器的联机讨论: