When debugging widget, every breakpoint causes ANR.
There is solution for Eclipse, but I can't find solution for IDEA.
Asked
Active
Viewed 441 times
6
-
Are you using an actual device or the emulator? – Steven Levine Jan 05 '12 at 18:07
-
I'm using latest emulator (SDK r16, platform r10, Android 4.0.3 image) and IDEA (11.0.1) – alper Jan 05 '12 at 20:48
-
I'm having the same problem. How can I debug widgets using IntelliJ on an actual device? – Siebe Jan 11 '13 at 10:21
-
3No problem here, IDEA 12 and android 4. Where are you placing breakpoints at ? – S.D. Jan 16 '13 at 10:27
-
@Singularity In the onUpdate method of the appwidget. After about 10 seconds after hitting the breakpoint the process closes because of an ANR. – Siebe Jan 18 '13 at 11:33
1 Answers
0
I wasn't able to reproduce the ANR. I'm using IntelliJ Idea 12, tried it with Android 4.1.2 and 2.3.3 emulators.
But if you find that the Eclipse solution is working for you, there is a way to attach to a running process in IntelliJ's debugger as well. First you just "Run" the app, and then attach the debugger to it using these steps. I set a breakpoint in the onUpdate() method of the widget and it worked successfully.

Anton Cherkashyn
- 5,719
- 6
- 43
- 80