About Ti.API.info Ti.API.debug Ti.API.error

You must Login before you can answer or comment on any questions.

Hi, I have gotten in trouble in Ti.API functions. When I use Ti.API.info, Ti.API.debug and Ti.API.error to show some information in the console, But I can't find any info I expected. on console window.

— asked 1 year ago by Jashon W
0 Comments

5 Answers

I have also faced this problem many times in Titanium Developer tool. After restarting some times it start printing (only some times). This happens to me many times. I don't know why this is happening. I have never got solution to this but i found another way to check my console logs.

Titanium is also printing logs in log file on hard drive. I don't know path of that file on winows but in mac you can find that log file in your project directory of iOS simulator. I mean that library/application support/ ios simulator ..... path.

those functions print in console the argument you pass to them, nothing more, nothing less. The only difference is the "log level" of each of them (and the color used to print). You can set up the log level in Run Configurations menu.

If this does not have sense for you, send a sample code of what are you doing and what do you expect, maybe I'm misunderstanding your question.

I have set the settings run configurations--->Log level->trace, but I can't find info I expected on console. The source code is as follows: Ti.API.info("DDDDDDDDDDDDDDDDDDDDDDDDDDDDD"); Ti.API.error("EEEEEEEEEEEEEEEEEEEEEEEEEEEE"); Ti.API.debug("FFFFFFFFFFFFFFFFFFFFFFFFFFFFF");

I didn't find any info , such as DDDDDDDDDDDDDDD, EEEEEEEEEEEEEEE, etc. in the console window.

If it's printing in console and if you are using iOS for development than have tried my suggestion ? Check the log file on hard drive, you will definitely get your log over ther. In previous answer i just gave u over view of path where you can find log file but here is exact path,

Library/Application Support/iPhone Simulator/4.0(or your iOS simulator/SDK version)/Applications/your applicaiton/Documents/appname.log

this log file will be same as your console. Check this file. You will be able to see your logs.

Sorry. I didn't develop on iOS. I am developing on Windows in Java. Could you give me some advice?

— answered 1 year ago by Jashon W
answer permalink
4 Comments
  • I don't have much idea on windows but still i will take a look and i will respond you.

    — commented 1 year ago by Yogin Bhungalia

  • Thanks for your answer. I have found the debug information. It must run the application in the emulator, then the debug information appears. By the way, Could you tell me how I can exit a application with Titanium? I.E. Which api can be called for exit application?

    — commented 1 year ago by Jashon W

  • Ohh .... you were trying directly on device. You didn't mention this thing and yah you can use window.close function and set the attribute of that window, exitOnClose:true.

    It will work for android only.

    — commented 1 year ago by Yogin Bhungalia

  • Show 1 more comment

Your Answer

Think you can help? Login to answer this question!