调试“及时启动”与xcode [英] debugging "failed to launch in time" with xcode

查看:157
本文介绍了调试“及时启动”与xcode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我设置我的调试环境,这样会更有意义吗?



在某些时候,模拟器停止加载我正在开发的应用程序。应用程序加载良好,如果我运行它与仪器,并在设备(iPad)上运行良好。



应用程序尝试加载,所有的突然,我得到一个调试尾端消息在xcode的左下角。



运行'tail -f /var/log/system.log'我发现以下消息:myApp无法启动在时间上。



在尝试断点之前,我能指出这个方法的罪魁祸首:



(BOOL)应用程序:(UIApplication *)
应用程序didFinishLaunchingWithOptions :( NSDictionary *)launchOptions;

这个方法是应用程序委托的一部分,它的第一件事是执行: p>

  [window addSubview:viewController.view]; 

所以我的问题 - 我该怎么弄清楚这里究竟发生了什么,应用挂了?



此外,什么样的设置可以用来从调试器获取有用的信息...



有一个错误,我甚至不能弄清楚生成它的代码行。



谢谢。

解决方案

如果您的应用程序无法及时启动,则意味着您的应用程序在此方法启动时会耗费时间


(BOOL)应用程序:(UIApplication *)
应用程序didFinishLaunchingWithOptions :( NSDictionary *)launchOptions;


如果超过一段时间,仍未启动,您的应用程序将自动终止。因此,您可以在应用程序完成启动后,查看代码并使其中的一些在后台运行。干杯。


can someone help me setup my debug environment so things will make more sense?

at some point the simulator stopped loading an app i'm working on. the app loads well if i run it with instruments and works well on the device (iPad).

the application tries to load and all of a sudden i get a 'debugging terminated' message at the bottom left of xcode.

running 'tail -f /var/log/system.log' i found the following message: " myApp failed to launch in time".

poking around and experimenting with breakpoints, i was able to pin point the culprit to this method:

- (BOOL)application:(UIApplication *)
application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;

this method is part of the app delegate naturally, and the first thing it does is execute:

[window addSubview:viewController.view];

so my questions - how can i figure out what the hell is going on here and which part of my app is hanging?

moreover, what kind of setup can be used to get useful information from the debugger...

whenever there is an error, i cannot even figure out the line of code that generated it.

thanks.

解决方案

If your app failed to launch in time, means your app is doing something time consuming at launch time in this method

(BOOL)application:(UIApplication *) application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;

if you exceed a period of time and still not launched, your application automatically terminated. So you could review your codes and make some of them run in background after your app has finished launching. Cheers.

这篇关于调试“及时启动”与xcode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆