Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Device Debug Assistance.
Started by tezc Sep 06 2018 11:35 PM

3 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

tezc

[GLOBAL: userInfoPane.html]
tezc
  • Observer

  • 10 posts
  • Corona SDK

Hi Guys.

Have some code doing some inexplicable things.  Works fine in the simulator, but the compiled debug version on my device behaves differently.

 

I'm using a Samsung Galaxy Note 8 and have it in developer mode of course...      I don't know how to see debug info on the phone - which is making the debug process extremely difficult.

 

I can print any value out to the console in the Simulator, but once compiled and installed on my phone, how do I see the same debug data?

 

Is there any tutorial (within Corona - or outside) on how to access the device's debug info?

 

Thanks for any assist...

 



[TOPIC: post.html]
#2

richard11

[GLOBAL: userInfoPane.html]
richard11
  • Contributor

  • 191 posts
  • Corona SDK

I'm not sure if there's a more 'proper' approach, but I used to do native Android dev using Android Studio, and before that, Eclipse SDK. Both included a console at the bottom of the screen that spat out all of the debug info from your device while it was USB'd in - not just for the app you're working on - you just need the device to be in developer mode which you've done already. Very handy for watching how intents talk to each other and what the sensors are reporting.

 

Presumably if you just open one of these IDE's, USB in, and run your app, you'll see the console outputs that the simulator shows. I've not tried myself though and again, there might be a better solution that I'm unaware of.

 

From memory I THINK Eclipse had a filtering option so that you didn't get bombarded with absolutely everything - I believe you could toggle the app that the console listened to. That might have only been for apps Eclipse was telling the device to launch though as opposed to everything the device was running. It's been a while, and my memory sucks.



[TOPIC: post.html]
#3

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 291 posts
  • Corona SDK

You might want to read https://docs.coronalabs.com/guide/basics/debugging/index.html#device-debugging-android.


  • roaminggamer likes this

[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,853 posts
  • Corona Staff

If you're on a Mac, this is really, super simple. Build for Android and choose to have the simulator install the APK to your device when the build is finished. You, of course, will have to have the device plugged into your USB port. When the build finishes, it will present a dialog box saying it was installed and something about your console log. Do not close that dialog. Now switch to the Corona console window and your device's console log will be routed to the Corona console log and you can easily see the device's messages.

 

If you're not on a Mac (and this also works on a mac) is to installed the Android Debug Bridge tools, which @XeduR refers to in the link above. If you're already using "adb" to install your app on your device, then you can simply do "adb logcat" to view the device's console log.

 

You ****may**** be able to get Android Studio to show you the console log as well, but I don't know how to make that happen.

 

Rob




[topic_controls]
[/topic_controls]