I have 2 Android devices connected to my computer.
I need to debug them both at the same time since I am sending data back and forth between them.
When I set them both to debug mode it will only stop one at a time.
I can't stop the "sender" immeditaly after the send and then debug the "receiver". It just doesn't like it!
I really need to be able to run two completely sessions.
I tried opening a new Eclipse window but it doesn't help.
Any stops I put apply to both and if any device is in debug mode then it applies to both instances.
Try using two machines. as the debug port both of them are trying to connect to is the same for a single instance of eclipse.
Unfortunately, I don't think that it's possible to debug multiple devices on the same computer using Eclipse, at least for now.
Related
I made one App based on Client-Server programming. I can run that App on multiple devices simultaneously, now I want to debug that App in multiple devices simultaneously so I can check the flow of both client and server simultaneously.
Is it possible in Android studio?? If yes then How can I achieve that??
You can do it by creating multiple launch/debug configurations and assign them the same module. Then just run debug each configuration on different device.
I believe you can start multiple instants by ctrl selecting your devices in the 'Deployment Target Options' pane.
There's annotation prepended in the 'Run' pane on which device is outputting... [DEVICE]-[DEVICE_NAME]-[SERIAL_NUM]
I want to debug communication between two Android apps. I have Android Studio 3.0.1.
I don't understand how to start up two instances of the app.
Technically, DipendraSharma's answer is wrong.
You can't watch the logcat for two devices at the exact same time, since you can't have two active instances of logcat at once (there is a post about this somewhere, but I can't find it). However, you can launch the app on as many devices as you have available at once, and change between the devices tab in the logcat window. Just like you'd select multiple items in i.e. a directory, you pick the devices you want. Press CTRL (or the equivalent on a different keyboard) and press the devices you want. Example:
Then, like normal, press launch and after a short while of compiling and launching, it'll show up on both (or however many devices you picked). There is going to be a delay between the nth and the n+1th device in terms of launch.
Now, open logcat. You'll see this:
The dropdown with the device allows you to change the current device you're debugging and can see log info about. Change this as you need.
So yes, you can debug on multiple devices at once. This also applies to emulators. And they mix, so if you want to test on two emulators and two real devices, simply pick the ones you want and it'll launch on all the devices.
For emulators, you can debug as many at once as your computer allows you. For real devices, you can debug as many as you have USB ports for.
You can debug communication between two apps by:
1- Opening both Android Studio projects of course in two different windows.
2- Running each app on a separate device/emulator.
3- Attaching the debugger from each project to the relative app instance.
4- Set up break-points and debug!
I have an android application which runs in a few different Android system. It works in all my mobile, tablet and one of my SmartTV system. But it only hangs in another different SmartTv system. My question is how I'm able to debug this issue? Currently I have no way to connect to this smart tv for debugging. Any suggestions will be appreciated. Thank you so much.
If you cannot debug it directly than I would try logging it expictly. E.g. add on every relevant point a http call where you log what happend.
I have a problem - my app works fine on the simulator, but on the device it crashes. Is there a way to debug an app that is running on the phone?
Thanks a lot.
Yes, it's perfectly possible. Just use Eclipse and register your device for debug use.
The procedure is a little bit different with each device, but you will basically need to put your device USB connection in debug mode and run your program/project within Eclipse IDE.
i have an app that has a few checkboxes in the settings and then compiles a remote sql based on the checkboxes selected. i ran it in the emulator and it's fine. but then i exported it and published it as an app, and the same checked boxes aren't being passed correctly. i wonder if it's a caching issue or something. tried deleting the apks a few times and republish but to no avail. i "fake-edited" the source java and then export again, still no difference.
i'm kind of new to eclipse but is there a force build option? i only see build-automatically option under project but not sure how i can make sure that the apk exported is the same as run in the emulator
edit the emulator is version 1.5, and my phone is nexus one running 2.1- not sure if that makes a difference
thanks
As Jim mentioned, always make sure you test your app on the same version emulator as you intend to use it. If it's going to be put on the Market, then make sure you test it on several versions. For example, test on at least v1.5, v1.6 and v2.1. Make sure you use different screen sizes as well for each of these; that's not going to be your problem here, but it will show you whether you've coded your XML files properly.
Another thing you can try is to enable your phone to output log messages, and then you can see if something odd is happening on your phone. I don't have a phone with v2.1, but according to the emulator, this is where that option is: home screen -> menu -> settings -> applications -> development -> enable USB debugging. Once you've done that, restart Eclipse, plug your phone in, and you should start seeing log messages. Restarting Eclipse isn't always needed, but LogCat sometimes gets confused when you've got multiple emulators/real phones trying to output debugging messages. (If you don't know how to enable LogCat, see this other answer.)