Hexor
Hexor

Reputation: 545

Where is the log printed when I use print("") in Corona Engine?

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

Upvotes: 4

Views: 5103

Answers (2)

otep
otep

Reputation: 49

If you are using Mac, follow this steps:

  1. Open Finder
  2. Go to Applications>Corona SDK>Corona Terminal
  3. Once it launches, click the "Simulator" button
  4. Navigate to your project folder and select the "main.lua" (your project starting file)
  5. It will then open your program in the simulator at the same time prints the logs in the terminal.

If you are using PC, simply double click Corona and the terminal will be opened automatically.

Upvotes: 3

Rob Miracle
Rob Miracle

Reputation: 3063

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.

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.

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

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.

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.

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

 adb logcat

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.

Upvotes: 12

Related Questions