没有显示错误 - iPhone 模拟器

发布于 2024-10-09 00:54:21 字数 306 浏览 0 评论 0原文

每当我的应用程序出现错误时,我的 iPhone 模拟器就会关闭。我正在使用最新版本的 XCode 进行编程,并且正在进行调试配置。为什么每当出现问题时,我的应用程序都会在模拟器中关闭并且不显示任何错误消息?这种情况已经持续了一段时间了。

另外,为什么会出现以下情况呢?

  1. 我按command-b(构建应用程序)

  2. 它显示我有一些警告

  3. 我再次按 command-b,警告消失

我希望所有警告保持不变,以便我可以修复它们...

谢谢!

Everytime there is an error in my application, my iPhone simulator just closes. I'm programming in the most recent version of XCode and I'm on Debug configuration. Why is it that anytime there is a problem, my application just closes in the simulator and doesn't display any error message? This has been going on for a while now.

Also, why does the following occur?

  1. I press command-b (to build the application)

  2. It shows I have some warnings

  3. I press command-b again and the warnings go away

I'd like all warnings to stay up so that I can fix them...

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晨光如昨 2024-10-16 00:54:21

听起来你没有在调试器中运行。有两个选项:“构建并运行”和“构建并调试”。当您在“运行”模式下发生崩溃时,iPhone(或模拟器)将关闭您的应用程序。您仍然应该能够通过查看控制台窗口了解发生了什么。在“调试”模式下,XCode 在崩溃时暂停您的应用程序,您可以在调试器中对其进行一些检查。

“调试”和“发布”配置仅与此问题外围相关,并确定编译器如何将可执行文件和捆绑包放在一起。

构建警告消失,因为您正在使用预编译文件。 XCode 仅重新编译已更改的文件。您可以通过从构建菜单中选择“Clean”来重新编译所有文件,然后再次构建。

Sounds like you're not running in the debugger. There are two options, "Build and Run" and "Build and Debug". When you have a crash during "Run" mode, the iPhone (or simulator) will just close your app. You should still be able to get a sense of what happened by looking at the console window. In "Debug" mode, XCode halts your app at the point of the crash and you can inspect it a bit in the debugger.

"Debug" and "Release" configurations are only peripherally related to this issue, and determine how the compiler does its work in putting together the executable and bundle.

Build warnings disappear because you are using precompiled files. XCode only recompiles the files that have changed. You can recompile all files by selecting "Clean" from the build menu and then building again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文