Titanium api.info never shows anything in the console

I just started with titanium, and I can't do Ti.API.info ("My Journal Post") to print anything in the console.

I tried running the application on my Android device, in the Android emulator, in the iPhone simulator and as a mobile web project in GoogleChrome, and the console window in Titanium Studio never prints my message in the journal.

My last attempt was in an imported Todo List sample. At the beginning of the app.js file, I added two log messages:

if (Ti.version < 1.8 ) { alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later'); } else { Ti.API.error('my error'); Ti.API.log('error','my error'); 

The application works on devices, emulators and in the browser, but this message is never displayed.

I am using the latest version of Titanium Studio, the latest Android SDK and xCode 4.2. Work on Mac OS X 10.6.8.

Titanium Studio, build: 2.0.1.201204132053

I will be happy to provide any other information that could indicate why this does not work.

Why is this not displayed on the console?

+7
source share
2 answers
  • Go to the menu "Project → Properties".
  • Select "Run / Debug" in the left pane.
  • Click on the Titanium iPhone Simulator - <your project name> in the list and the "Change ..." button.

The platform configuration properties have the Log level property. Make sure it's Info, Debug, or Trace to see Ti.API.info messages on the console.

Clean the project and run it again.

+6
source

Is your console only red? If so, you are showing the wrong console (there are several in the Titanium IDE). The console should have a dropdown menu. Try switching through the options and searching for the outputs for your Ti.API.info message.

+1
source

All Articles