Xcode 8 (Swift) 控制台中没有打印输出
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39676073/
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
Xcode 8 (Swift) No print output in Console
提问by Alex Pilugin
The question in the topic: Why no print output in Console using Simulator? Is it disabled or this is a bug?
主题中的问题:为什么使用模拟器在控制台中没有打印输出?它是禁用的还是这是一个错误?
回答by Nazmul Hasan
Try with this way
用这种方式试试
View --> Debug Area --> Activate Console
查看 --> 调试区 --> 激活控制台
回答by Edess Elder
回答by fafa
I found that you could not type print("the data you want to print")
in normal class with no type.
我发现你不能print("the data you want to print")
在没有类型的普通班级中输入。
You need to type this code in general viewController
, such as UIViewController
or UITableViewController
.
您通常需要键入此代码viewController
,例如UIViewController
或UITableViewController
。