Xcode 没有启动我的应用程序进行调试

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9119294/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 23:11:37  来源:igfitidea点击:

Xcode is not launching my app for debugging

iphoneiosxcodedebugging

提问by neowinston

My iOS project installs fine on the iPhone but the application won't launch automatically for debugging.

我的 iOS 项目在 iPhone 上安装正常,但应用程序不会自动启动以进行调试。

I'm using Xcode 4.2 (Build 4C199), the latest version for Snow Leopard (10.6.8).

我正在使用 Xcode 4.2 (Build 4C199),Snow Leopard (10.6.8) 的最新版本。

I've already tried deleting the app from the iPhone, restarting the device, cleaning the project and reinstalled xCode.

我已经尝试从 iPhone 删除应用程序,重新启动设备,清理项目并重新安装 xCode。

Any ideas on how to solve this problem?

关于如何解决这个问题的任何想法?

采纳答案by neowinston

I've been able to solve this problem by Changing Debugger to LLDB, instead of GDB, on the Run Tab, using Build Configuration -> DEBUG, by selecting Edit Scheme (On the right of the Stop Button).

我已经能够通过在运行选项卡上使用 Build Configuration -> DEBUG将Debugger更改为 LLDB而不是 GDB来解决这个问题,方法是选择 Edit Scheme (在停止按钮的右侧)。

回答by Oscar Gomez

In Xcode click on where the project name/Device or simulator version is (On the right of the Stop Button), and select Edit Scheme, on the Run Tab select Build Configuration -> DEBUG, and select a DEBUGGER -> GDB.

在 Xcode 中单击项目名称/设备或模拟器版本所在的位置(在停止按钮的右侧),然后选择 Edit Scheme,在 Run 选项卡上选择 Build Configuration -> DEBUG,然后选择一个 DEBUGGER -> GDB。

回答by diabetesmike

I was having this problem as well. I removed the option Launch due to a background fetch eventin Edit Scheme -> Run Debug -> Optionsand Xcode started launched the app again.

我也遇到了这个问题。由于Edit Scheme -> Run Debug -> Options 中的后台获取事件,我删除了Launch选项,然后 Xcode 再次启动了该应用程序。

Hope that helps.

希望有帮助。

回答by Reinhard M?nner

In my case, I created a new target and a new scheme by duplicating the existing ones, in order to test my app on devices with on older iOS version.
However, the copied scheme had as executable selected "None":

就我而言,我通过复制现有目标创建了一个新目标和一个新方案,以便在使用较旧 iOS 版本的设备上测试我的应用程序。
但是,复制的方案作为可执行文件选择了“无”:

enter image description here

在此处输入图片说明

As soon as I selected the right executable there from the drop-down menu, the app launched.

一旦我从下拉菜单中选择了正确的可执行文件,应用程序就会启动。

回答by murat

Can you confirm you are signing the app with a development certificate? This issue happens when you sign the app with a distribution certificate.

您能否确认您正在使用开发证书签署应用程序?当您使用分发证书签署应用程序时会发生此问题。