Xcode 中的“正在等待附加到 [设备名称] 上的 [应用名称]”消息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/45594511/
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-15 10:10:43  来源:igfitidea点击:

"Waiting to attach to [app name] on [device name]" message in Xcode

iosxcode

提问by Zhen Liu

For some reason, when I build my app and run in Xcode, the app will install on my device but it won't launch.

出于某种原因,当我构建我的应用程序并在 Xcode 中运行时,该应用程序将安装在我的设备上,但不会启动。

The status bar on top of Xcode says something like:

Xcode 顶部的状态栏显示如下内容:

Waiting to attach to 'app name' on 'device name'

等待附加到“设备名称”上的“应用名称”

No console outputs are printed. The app does not launch.

不打印控制台输出。该应用程序无法启动。

How can I fix this? I need to see console outputs in order to develop properly.

我怎样才能解决这个问题?我需要查看控制台输出才能正确开发。

Thanks.

谢谢。

回答by Tamás Sengel

This is because you accidentally selected "Wait for executable to be launched"in your scheme settings.

这是因为您不小心在方案设置中选择了“等待可执行文件启动”

Click on your scheme to reveal your schemes and scheme settings.

单击您的方案以显示您的方案和方案设置。

Schemes list

方案清单

Click on Edit Scheme..., located on the bottom.

单击位于底部的Edit Scheme...

"Edit scheme..." option on the bottom

底部的“编辑方案...”选项

Select the Runoption on the left and the Infotab on the top.

选择左侧的运行选项和顶部的信息选项卡。

Scheme options

方案选项

Within the Launchsection, select Automaticallyand save your settings.

启动部分中,选择自动并保存您的设置。

Launch settings

启动设置

回答by Zhen Liu

Cause by

原因

Product -> Scheme -> Edit Scheme -> Run -> Info -> Launch automatically

产品 -> 方案 -> 编辑方案 -> 运行 -> 信息 -> 自动启动