Adding a breakpoint in Eclipse crashes Dalvik

This is an interesting Eclipse bug. I use:

Version: Indigo Edition
Build ID: 20110615-0604

Out of nowhere today, I set a breakpoint in my Android app on Eclipse. When it reaches the code, debug (dalvik JVM) aborts and crashes:

Tried to execute the code in an unprepared class (followed by the class name)

If I do not set a breakpoint, it will work without problems. I searched through Google but found nothing.

Another note, when I set this breakpoint, it does not matter, it may just be the first line of the onClick () function or elsewhere. The moment the application β€œ pauses ” due to a breakpoint, it will work.

+6
source share
3 answers

I solved this problem by removing the unused import package.

actually the error message says "tried to execute code in an unprepared class" (followed by the class name)

I do not use this class, but it is imported.

Just remove the import and it works great.

0
source

I ran into the same problem; for me the problem was solved by deleting all the observable expressions that I configured in the debugger (one of them caused the problem).

+25
source

I am facing the same problem when using a watch expression with a static method of this (unprepared) class. I solved this problem by removing this expression from the list of expressions.

+2
source

Source: https://habr.com/ru/post/916467/


All Articles