Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve "Waiting until last debugger command completes" stuck in Android Studio?

My project is in Android Studio. It has around 35 thousand lines in a Windows 7. My environment is updated. I use Kotlin and not Java, but it's not important. I have lot of memory in my computer.

I read all material in Internet about the message Waiting until last debugger command completes while debuggng my app in the cell phone.

For me, the debugger works in normal pace, or it stucks (hangs) completely, or sometimes it's very slow.

I have threads in my app, but many times this problem occurs outside of any thread. Just in plain code!

I've posted it as a bug in Google Issue Tracker and JetBrains, including the dump file and idea.log file. Google has stamped the priority as P3 and severity as S3 (low levels). JetBrains have answered me and I've produced many dumps and screenshots. They have claimed that the problem can only be Google's. Too much time has passed with no more positioning by JetBrains but today (Out/2) Andrei Kuznetsov from JetBrains has given me one suggestion (item f below)

Possible workarounds that can't solve my problem:

a) Erase all watch variables. Improves a little bit.

b) Erase old breakpoints. It's not enough.

c) Execute Invalidate Caches and Restart

d) Uncheck Enable ToString object view in Settings, Build,Execution and Deployment, Debugger, Data Views, Java

e) Disable JIT is unchecked in Debugger settings

f) I try to disable the option Force classic VM for JDK 1.3x and earlier in Debugger settings, but it also doesn't work.

g) In this issue tracker in Google from 2015, I've read a tip about trying to change in some breakpoint the Suspend type from all to Thread and make this option default.

h) During running, in debug window, click in some variable with right mouse button, and select Mute Rendering, that generates a big overhead in debuggin session. It was saved for future sessions. (JetBrains suggestion)

i) Now I'm trying go to Settings -> Debugger -> Data Views -> Java and disable the option Enable alternative view for Collections classes (From fireb86 answer). Let's see what happens.

-/-

There are JetBrains reports about this problem since 2008!

Disclaimer: It contains many updates I since I've asked the original question. I join all information to make reading this issue more fluid.

like image 995
Paulo Buchsbaum Avatar asked Aug 06 '20 19:08

Paulo Buchsbaum


1 Answers

I've this issue for a few months with Idea 2020.2 + android plugin and, in my case, I resolved by disabling:

Settings -> Debugger -> Data Views -> Java -> Enable alternative view for Collections classes (enabled by default)

and

Settings -> Debugger -> Data Views -> Java -> Enable ToString object view (enabled by default)

as recommended by this comment

like image 71
fireb86 Avatar answered Nov 10 '22 15:11

fireb86