如何在 Xcode 中查看完整的错误或警告?

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

How can I see the full error or warning in Xcode?

xcodexcode4

提问by rid

No matter how large I make the window, this is all I can see of warnings:

无论我制作多大的窗口,这都是我能看到的警告:

How can I see the full text of the warning at the place it appears?

如何在警告出现的地方看到警告的全文?

I couldhover the mouse over the warning as it appears in the left pane and, after waiting long enough, a tooltip appears with the full text, but I find this very awkward... Is this the only way?

可以将鼠标悬停在警告上,因为它出现在左窗格中,等待足够长的时间后,会出现一个带有全文的工具提示,但我觉得这很尴尬......这是唯一的方法吗?

采纳答案by justin

The Issue Navigator is a compact representation. If you really want allthe details, you can view the build transcript:

问题导航器是一个紧凑的表示。如果你真的想要所有的细节,你可以查看构建成绩单:

  • cmd+7
  • click on the top-most "Build $APP" section.
  • locate the warning or error
  • click the buttons on the right to see the full details of the step you are interested in
  • 命令+7
  • 单击最顶部的“Build $APP”部分。
  • 定位警告或错误
  • 单击右侧的按钮以查看您感兴趣的步骤的完整详细信息

Double clicking on a message will then reveal the source location in the editor.

双击消息将在编辑器中显示源位置。

回答by smileBot

#### Here's a very handy trick: ####

#### 这是一个非常方便的技巧:####

1)Look in the issue navigator

1)查看问题导航器

enter image description here

在此处输入图片说明

2)Go to: xCode preferences > General > "Issue Navigator Detail" > now boost the dropdown to 10 lines.

2)转到:xCode首选项>常规>“问题导航器详细信息”>现在将下拉列表增加到10行

Now you can see the whole message in the issue navigator!

现在您可以在问题导航器中看到整个消息!

enter image description here

在此处输入图片说明

回答by digitalvision

The easiest way to do it is right clicking the message in the "Issue Navigator" and choosing "Reveal in Log".

最简单的方法是右键单击“问题导航器”中的消息并选择“在日志中显示”。

回答by Tony

In Xcode 9.2 (at least), you can single click on the error / warning iconin the tooltip and it will expand.

在 Xcode 9.2(至少)中,您可以单击工具提示中的错误/警告图标,它会展开。

回答by Alex Godbehere

I'm sure if you expand the left hand pane, it shows the full error. Ensure you are in the Warnings/Errors tab.

我敢肯定,如果您展开左侧窗格,它会显示完整的错误。确保您位于警告/错误选项卡中。

As far as I'm aware, this is the only way to do it.

据我所知,这是唯一的方法。

回答by alessio271288

you can find, the warning/error list in the Warning tab section on the left

您可以在左侧的“警告”选项卡部分中找到警告/错误列表

回答by Joshua Nozzi

You can similarly hover over the warning itself. Even "unused variable" can be squished small enough so it can't fit (if you downsize the editor enough). Hover over the warning in place is the closest you'll come.

您可以类似地将鼠标悬停在警告本身上。甚至“未使用的变量”也可以被压得足够小,以至于无法容纳(如果您足够缩小编辑器的大小)。将鼠标悬停在适当位置的警告上是离您最近的位置。