Objective c 在设备上触发断点,但在模拟器上不触发断点
我有一个奇怪的情况,Xcode在实际的iPhone设备上运行时只捕获断点,而不是在模拟器上Objective c 在设备上触发断点,但在模拟器上不触发断点,objective-c,xcode,debugging,breakpoints,ios-simulator,Objective C,Xcode,Debugging,Breakpoints,Ios Simulator,我有一个奇怪的情况,Xcode在实际的iPhone设备上运行时只捕获断点,而不是在模拟器上 -(IBAction)ping1:(id)sender { // this is the break point NSString *path = [[NSBundle mainBundle] pathForResource:@"dontforgetme" ofType:@"mp3"]; AVAudioPlayer *sound = [[AVAudioPlayer alloc] i
-(IBAction)ping1:(id)sender
{
// this is the break point
NSString *path = [[NSBundle mainBundle] pathForResource:@"dontforgetme" ofType:@"mp3"];
AVAudioPlayer *sound = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
[sound play];
}
另一个问题是,当按下按钮时,会调用ping1
,声音会播放,但即使MP3文件有3分钟长的声音,也只能播放一秒钟或更短的时间
我一点都不明白。这怎么可能发生?我怎样才能找到问题