Appcelerator Titanium - how to view alert in logcat? - appcelerator

If i have an alert in my app
alert("howdy");
What do i have to do to view that alert using the adb logcat command? I've tried adb logcat *:v but nothing shows up - even though I can see the alert in the running app!

alert() shows a dialog in Android, doesn't do any console/adb.
However, if you want things to show up you should use logging tools
If you dive into documentation you need to use the debug, info and error methods to insert different levels of logging.
console.log(), console.warn() and console.error() work too.

Related

NSLog not working when debugging an app extension

I just can't see any logs in the window, even though I know I'm attached to the extension, I can place and enter into breakpoints, as well I see the values of variables.
However I can't see any logs.
Any ideas?.
Normal app logs works just fine.
Seems like you are running the actual main app, not the extension (wrong scheme).
In Xcode, next to the play and stop buttons it should say the name of your app and the device you're running on. Make sure it says the name of your extension, not the name of your actual app.
Please see the attached screenshot:
As you can see, I have selected my keyboard extension - not the main application 'TransKey'. Once you do that, you should be able to see the logs in the Debug area for your extension.

Viewing traceback info when developing for Tizen Gear watch?

I was recently given a Samsung Gear S2 and asked to develop with it. I have some experience working with Andorid and find the two to be similar, however I can not find any tracebacks from when my Tizen apps crash. I have tried opening command prompt and running "sdb.exe dlog" which shows some messages while things are happening, but nothing that appears to be a traceback to my original code. Am I debugging properly or just not looking in the right place? Do Tizen Watch web apps/ native apps/widget apps even produce tracebacks?
Thanks!
Use
dlog_print(DLOG_ERROR, LOG_TAG, "Your error message with return code %d", ret);
For different type of log you can use DLOG_ERROR, DLOG_DEBUG, DLOG_DEFAULT, DLOG_INFO etc.
To view LOGS go to:
Tizen IDE > Window > Show View > Log
In Log view you can turn on/off log types, you will see that there are [V], [D] (debug), [I] (info), [W] (warning), [E] (error) and [F] (fatal) icons.
You can turn those ON/OFF to show/hide those type of logs. Do not forget to check if these are ON or OFF, if not ON no log will be shown.
Also DO NOT FORGET TO RUN IN DEBUG MODE.
Hope that helps.

Does google play services for Unity use the profiler?

I am trying to debug my game in logcat but when I add the script debugger in the build settings my logcat gets flooded with profiler is only supported in Unity Pro.. Since I'm not using the profiler and only use the Google Play Services as a 3th party script I suspect it of starting the profiler.
If so, how do I turn that off so I can debug properly? If not, what else could it be?
I have been trying to filter the text message profiler is only supported in Unity Pro. out of logcat but without success. I'm using the UI monitor.bat in the tools map that come with the Android-SDK. This should be a workaround.
According to the documentation: http://docs.unity3d.com/Manual/Profiler.html - the profiler is a Pro only feature.
The profiler is different from the debug log messages.
To get debug messages out of my app, I call Debug.Log("....") in my scripts, and just run adb logcat and the messages show up:
I/Unity (12241): Status Update: Starting sign-in...

Pebble.js WatchApp displays: "Disconnected - run the pebble phone app"

I can't find much documentation around this issue. All other running apps on my pebble have a connection to my phone, and work as expected. However, a Pebble.js application I'm currently working on simply displays Disconnected - run the pebble phone app.
I have noticed that in my Developer Settings that the Connection Manager is listed as Disconnected. Is this part of the problem? I see nothing in the logs.
For reference, the application is doing a simple ajax request and displaying the result.
This message is often caused by the JavaScript crashing on the phone (undefined reference, unknown function, etc) and so the watch thinks it is not running.
Some ideas to debug this:
Replace your code with one very simple console.log("hello world") statement and see if this works.
Look at the Logs (View Logs button in CloudPebble or pebble logs on the command line).
Very rarely, on Android, I have seen situation where the Pebble app is in a bad state where it cannot execute the JS for only one app. When this happens, you need to force-kill the Pebble app and relaunch it.
I have had the same experience.
I usually kill and restart the pebble app on my phone and then I also do refresh the browser. Sometimes you have to log out of and then log back into Cloudpebble.

Blackberry Simulator - printing only relevant debug messages

When debugging in the blackberry simulator, the console prints out a lot of other information relevant to the simulator along with the debug information printed in the application I develop. Is there a way to print only the debug messages of the application I am running in the simulator?
I always format my debug messages in specific way:
System.out.print(" ---RTP:"+message);
So it's easy to find specific message from my app.
Also, it's great to scrollock console searching or reading messages.

Resources