当我在Corona Engine中使用print(“”)时,日志在哪里打印? [英] Where is the log printed when I use print("") in Corona Engine?

查看:87
本文介绍了当我在Corona Engine中使用print(“”)时,日志在哪里打印?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在代码中使用了 print( Helloworld)函数,在哪里打印输出?

I used the print("Helloworld") function in the code, where is the output printed?

推荐答案

很大程度上取决于您启动Corona的方式以及在Mac或PC上运行还是在XCode模拟器或设备上运行时查找此信息。

A lot depends on how you started Corona and if you're on a Mac or PC or if you're looking for this information while running in the XCode simulator or on a device.

对于Mac而言,最好使用Applications / CoronaSDK文件夹中的 corona-terminal应用程序启动Corona SDK。这将启动终端应用程序,然后将启动Corona SDK。您的错误,警告和打印语句将显示在启动的终端窗口中。在这种情况下,有一些IDE类型编辑器可以为您启动Corona SDK,它们可以捕获输出并将其显示在IDE中。

For a Mac, you are best to start Corona SDK using the "corona-terminal" app in the Applications/CoronaSDK folder. This will launch the Terminal app, which will in turn launch Corona SDK. Your errors, warnings and print statements will show in the terminal window that gets started up. There are some IDE type editors that can start Corona SDK for you in which case, they can capture the output and show it in the IDE.

在PC上,Corona SDK将为您启动一个cmd shell屏幕。打印消息在那里显示。

On a PC, Corona SDK will start up a cmd shell screen for you. The print messages show there.

使用XCode模拟器(不是Corona SDK模拟器)时,您将在Console应用程序中找到输出。使用聚光灯(Mac右上方的放大镜),输入控制台并启动应用程序。

When using the XCode simulator (not the Corona SDK simulator), you will find the output in the Console app. Using spotlight (The magnifying glass at the top right of your mac), type in "Console" and launch the application.

如果已将应用程序安装到Apple设备,则可以将XCode的管理器与设备绑定到Mac的USB端口,并且左侧导航栏上有一个链接称为控制台,可让您查看来自设备的日志消息。

If you have installed the app to an Apple device, you can use XCode's Organizer with your device tethered to the Mac's USB port and there is a link on the left nav bar called "Console" that will let you see the log messages from the device.

在Android上,您需要从终端窗口安装 Android Debug Bridge工具,您可以输入以下命令:

On Android, you need to install the "Android Debug Bridge" tools and from a terminal window, you can enter the command:

 adb logcat

,并将您的Android设备绑定到计算机的USB端口,以查看来自Android设备的控制台日志消息。 Android设备必须处于开发人员模式才能运行。

with your Android device tethered to your computer's USB port to see the console log messages from the Android device. The Android device needs to be in "Developer Mode" for this to work.

这篇关于当我在Corona Engine中使用print(“”)时,日志在哪里打印?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆