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

huangapple go评论80阅读模式
英文:

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

问题

我的项目在Android Studio中。它有大约3.5万行代码,运行在Windows 7上。我的环境已经更新。我使用Kotlin而不是Java,但这不重要。我的计算机内存很大。

我阅读了关于在手机上调试我的应用程序时出现消息等待上一个调试命令完成的所有相关材料。

对我来说,调试器要么正常工作,要么完全停滞(卡住),有时候非常慢。

我的应用程序中有线程,但很多时候这个问题发生在任何线程之外,就在普通的代码中!

我已经在Google问题跟踪器JetBrains中报告了这个问题,包括dump文件idea.log文件。Google将优先级标记为P3,严重性标记为S3(低级别)。JetBrains已经回复了我,我生成了许多dump文件和截图。他们声称这个问题只能是Google的问题。JetBrains已经很长时间没有再定位了,但今天(Out/2),Andrei Kuznetsov从JetBrains给了我一个建议(以下是f项)

不能解决我的问题的可能解决方法:

a) 删除所有观察变量。略微改善。

b) 删除旧的断点。这不够。

c) 执行Invalidate Caches and Restart

d)设置构建、执行和部署调试器数据视图Java中取消选中启用ToString对象视图

e)调试器设置中取消选中禁用JIT

f) 我尝试在调试器设置中禁用选项强制经典JVM用于JDK 1.3x和更早版本,但也不起作用。

g)这个Google的问题跟踪器中,我读到了一个关于尝试将某个断点的suspend类型从all更改为Thread并将此选项设置为默认的提示。

h) 在运行期间,在调试窗口中,右键单击某个变量,然后选择Mute Rendering,这会在调试会话中产生很大的开销。这将保存供将来会话使用。(JetBrains建议)

i) 现在我正在尝试进入设置 -> 调试器 -> 数据视图 -> Java,然后禁用选项启用集合类的替代视图(来自fireb86的回答)。让我们看看会发生什么。

-/-

关于这个问题,自2008以来就有JetBrains的报告!

免责声明:这包含了自我提出原始问题以来的许多更新。我将所有信息组合在一起,以使阅读这个问题更加流畅。

英文:

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.

答案1

得分: 4

我有这个问题已经几个月了,使用的是 Idea 2020.2 版本 + Android 插件,在我的情况下,我通过禁用以下方式解决了:

设置 -> 调试器 -> 数据视图 -> Java -> 启用集合类的替代视图(默认启用)

设置 -> 调试器 -> 数据视图 -> Java -> 启用 ToString 对象视图(默认启用)

此评论中建议的方式。

英文:

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

huangapple
  • 本文由 发表于 2020年8月7日 03:12:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/63290304.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定