Viewing traceback info when developing for Tizen Gear watch? - debugging

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.

Related

How to enable Xbox One Developer Mode activation?

I following this link to enable developer mode on xbox.
https://learn.microsoft.com/en-us/windows/uwp/xbox-apps/devkit-activation
Everything is fine except that after activating xbox with code, It is showing this message
If anybody can assist how to fix this? It's been two days and still showing this message. Thanks!
Update
The newest app called 'Xbox Dev Mode', with Xbox Series S and X logo, which can work as before. But their docs haven't changed yet.
=========================================================
This may be a production bug of MS. But you can enable dev mode with some hidden skills.
Settings > System > Console Info > Press LB RB LT RT quickly > Developer Settings > Developer Mode.
Check it, your console will restart to dev mode.
Thanks.

Appcelerator Titanium - how to view alert in logcat?

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.

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.

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.

WP7 app won't launch from app list

I have a simple Windows Phone 7 application which is working perfectly when started from Visual Studio. However, if I deactivate the app (press Windows button or back button from the application's MainPage) and then click the app's icon to relaunch, the screen will flash and return to the list/home screen. I assumed this was an issue with the emulator but when I got a developer device I have the same issue.
Note that reactivating without a complete tombstone works (pressing Windows button from the app and then back).
I have no idea what causes this or how to proceed with debugging. Hopefully someone else has experienced this and knows a fix.
Turns out there is a bug, i found the solution here http://forums.create.msdn.com/forums/p/67522/416995.aspx
In short, it turns out that the Microsoft.Xna.Framework.Media.MediaLibrary class (which I am using to display pictures on applications main page) is not properly initialized when the user has not opened a media hub prior to you calling it. So picture collection properties are null or empty. The solution is to add a call to MediaPlayer.Queue.ToString(), it will force the initialization of the native media library allowing you to invoke the MediaLibrary later on.
Sounds like an unhandled error on startup is causing the app to crash.
Trap/log/handle/display any unhandled exceptions. Also check what you're doing on startup.
IF you are saving something (to Isolated Storage) after first run and then opening it on subsequent launches then that's where I'd look first.
If it works when launched from Visual Studio then this will probably be due to the way you are rebuilding/redeploying the app before launching it in that case.

Resources