Eclipse keep deploying to device in debug mode - android

After deploying to my device once for debugging, every time I try and "Run As" in regular mode it still attached the debugger. I have deleted the application from the device and it still does this. This causes and issue when I just want to run the app, untethered from my laptop.
Has anyone else ran into this issue? If so, how do you fix it.

Does clicking on the "Disconnect" button do the trick?

Try restarting Eclipse. I had this issue once and restarting Eclipse worked for me.

I have had problems with this as well. I don't recall what specifically fixed the problem, but I remember I did a combination of: 1) changing the configuration to "Run" only, 2) restarting Eclipse, and 3) trying multiple times.
One thing to keep in mind- even in "Run" mode you can see things going on in the debugger. For instance, you still get log messages. The main difference that I see is that it is much faster, and you don't see the threads and variables.

Related

Ever since clearing logcat, logcat shows nothing

About a week ago I cleared logcat with the "clear logcat" button on the top left of the logcat screen. Since then, nothing shows up in logcat.
This may sound like some duplicate question, but I have tried every accepted answer with no change. I need some ideas or solutions. Don't close this saying it's a duplicate please.
I have invalidated caches/restarted.
Restarted Android Studio.
Restarted my phone.
Killed, Restarted, updated the adb.
Restarted computer.
Pressed alt+6 multiple times to restart logcat.
Hit the restart button in the logcat panel. Then changed options like debug/verbose as other solutions say.
I have also checked and rechecked every field in logcat (verbose, no filter, etc) and have tried every possible combination, including the usual "fix" of verbose + no filter. I can't even get logs (Log.i, eg) to show up.
Another solution was to go to Tools>Android>Enable ADB integration. This option no longer exists.
More info: Windows 10, newest version. Android Studio 3.4.2.
Edit: My question is DIFFERENT because NONE of those solutions have worked, as stated originally.
I have also now done a complete clean reinstall of Android Studio and still no working logcat.
Edit 2: So I guess this must be a bug of some kind? No solutions after weeks of trying everything. I'll contact Android support I guess? Hopefully it works out.
Try adding debuggable: "true" to the application tag in manifest. Compile your project now and you'll saw every log in the logcat. Hope it may help you.
My model of ZTE phone does not allow logcat. People have reported the same issue with this phone. So it's the phone and not Android Studio or my app.

Android app runs very slowly after resuming from breakpoint

My Android app runs dead slow (almost frozen) after resuming from a Java breakpoint, even if I disconnect from the debugger or even unplug the USB cable. I get the same behavior on every device and emulator I've tried. Performance is great until it hits the first breakpoint, but it's unusable after I resume and I have to kill it. It's very frustrating.
It used to work great but it started with Android Studio 3.1.x and it's still happening after I upgraded to 3.2.1, then 3.3.2, the latest stable release at this time. None of my colleagues who work on the same app have this problem so it's probably not the code. I suspect I have a configuration issue somewhere.
I have no idea what changed when it started. It happens no matter where the breakpoint is. I don't see any errors in LogCat.
I'm using a MacBook Pro (15-inch, 2017) running OSX 10.13.6, Android Studio 3.3.2 (current stable release) and a Pixel XL running P. Also various emulators running P.
Any ideas or suggestions are much appreciated.
NOTE: It happens on Java breakpoints but not Kotlin.
NOTE: I cannot repro with a simple default app, so it's project specific, but only on my machine.
As #Magudesh stated, method breakpoints are very slow for the android debugger.
It's a lot more useful to just add a line breakpoint in the first line of your method and then (if it's necessary) in the last line.
That will greatly increase performance. If you then want to jump to the next breakpoint you can just hit the green play button in your debugger window.
make sure your debugger is ok .
Don't add breakpoint in the method definition. Method breakpoint will decrese the performance. Go with line breakpoint. That is better.
Please go through the difference b/w method breakpoint and line breakpoint if you are not aware.
Try to remove all the previous breakpoints that you might have added in Android Studio.
Go to the debugger window and select the View Breakpoints option and then disable all the old breakpoints and only add the new one which you want to use.

Eclipse Activity Not Restarting on Code Change

It used to be that when I changed a piece of code and ran the project, Eclipse would kill and restart the app on my phone. I'm now getting "Warning: activity not started, its current task has been brought to the front" whenever I try to run regardless if whether I've updated code or not. I have tried deleting and adding entire code segments then running and I'm still getting this. I'm now having to resort to actually manually killing the app on my phone whenever I want to update the code. Any clue as to what is going on?
Update: one thing that I've changed recently is that I've updated HTC sync manager which has the HTC USB drivers and reinstalled Google USB drivers. Could that be the reason?
Normally It happens when you have not changed anything in your code. I had same error on emulator when I am not changing anything and still run the same code.
K looks like that you heavent mentioned you activity in manifest.
See this documentation. Or u could try to reset eclipse to default.
And if it doesn't solves ur problem then please paste the error log here...

Logcat data not displaying in the Log Tab of DDMS Eclipse

The log tab is visible in DDMS and I have been logging data using Log.v(...) for many a week now without any problems.
Today, the log data is now longer being displayed in the Log window. Worked, then did a programming change to track a bug and now the log data is no longer showing.
Have tried running the app on an external Android phone, on the Android Simulator and it makes no difference.
Have closed down Eclipse, reloaded and still no change.
The console displays activity but only to the point of starting the activity.
The external phone is set up for debugging - not that this could be a problem since I have the same problem with the simulator
It looks like I have inadvertantly set something incorrectly but can't remember changing anything :-(
Anyone come across this problem before - have looked at previous posts but none seem relevant.
Regards,
Oliver
I had the same problem a while back. I was using the emulator and device for debugging. Apparently you have to select the device listed in the DDMS view whose logs you want to see. My logs were blank because the device that I was expecting logs from was not the one selected.
Hope that helps
Tried this:
https://stackoverflow.com/a/9826502/1238317
Check in your logcat window - TOP RIGHT corner PAUSE button || (Pause
receiving new logcat messages)
Few clicks + eventually restart eclipse (usually works in my case)
Check your LogCat window to see if you are filtering and make sure to set the debug level to Verbose.
There are possible reasons and solutions:
LogCat might have to much in cache, clear the log and see if it fixed the issue
You might need to select the device in the device view (even if it is already selected, try to click on it)
adb is not correctly working anymore, try to kill and start it again
Check if you see output if you use the command line adb logcat
Just go to DDMS perspective and click on the device's name in upper left corner and done your log cat will Start with a BOOm :P
In Android Studio, which I have found to be much more reliable and intuitive than Eclipse, I found this to be a common issue. For me what solves it (device is automatically set when running your app) besides checking code, is to Quit and restart the emulator or Quit Android Studio and Emulator and reopen/restart

LogCat Stops Running in Eclipse Needs Restart

Periodically LogCat will stop showing messages even though I am in debug mode. At other times it will display only one line at a time! I have a solution, restart eclipse. But I would like to understand this better. It takes too much time to restart eclipse when this happens. I have seen this behavior on the emulator and connected to a device. Either the LogCat shows one line with no history or nothing.
I was with the same problem and the solutions here didn't work for me. The solution I found is open the DDMS perspective and select the device and the running process on the Devices window. With that done, the LogCat returns to life.
Yes, I can get the normal logcat back by clear the log. Also I uncheck the "Limit console output" in Run/Debug->Console.
I solve these LogCat issues in two different ways:
Clearing the log to fix the one line at a time issue
Opening the devices window (Window -> Show View -> Other -> Android -> Devices), and clicking on the device that I want to view the log for. This seems to force Android to refresh LogCat on that device.
These are much easier options than restarting eclipse, or messing with adb.
I've had that "one line at a time" problem numerous times. I don't know why exactly it happens but there is a very simple fix that works for me every time. Just hit the clear log button. Simple and easy.
I've also had Logcat fail to show messages. Generally this has been due to a problem with the emulator and it required an emulator restart.
In eclipse you need to give more space to log buffer, default is 5000, i set it to 50000 and no have any problems.
Window->preference->android>logcat
maximum num of log message to buffer __ set some number 50k is ok
I'd recommend adjusting the Logcat buffer size and enable workspace application message monitoring in your preferences, mine are set as seen below.
On a real Device (mine is an HTC Desire in question) I've found simply disabling then enabling ADB does not always solve it. What works more often is to disable ADB, close the page (perhaps by back) then to renter the Development page, and re-enable debug mode.
Same here! What worked for me is open DDMS perspective and on devices pane I clicked
reset adb
Click "Display saved filters view" button By showing the two-pane view of your LogCat you'll be able to check the active filter in the left-pane. I once fixed the empty LogCat by selecting "All messages".
When logcat stops displaying log entries, I find that closing Eclipse and re-opening it solves the problem for me.

Categories

Resources