在Intellij IDEA中调试Android小部件

时间:2023-01-18 09:04:12

When debugging widget, every breakpoint causes ANR.
There is solution for Eclipse, but I can't find solution for IDEA.

调试小部件时,每个断点都会导致ANR。 Eclipse有解决方案,但我找不到IDEA的解决方案。

1 个解决方案

#1


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.

我无法重现ANR。我正在使用IntelliJ Idea 12,尝试使用Android 4.1.2和2.3.3模拟器。

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.

但是如果你发现Eclipse解决方案适合你,那么有一种方法可以附加到IntelliJ调试器中正在运行的进程。首先,您只需“运行”该应用程序,然后使用这些步骤将调试程序附加到该应用程序。我在小部件的onUpdate()方法中设置了一个断点,它运行成功。

#1


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.

我无法重现ANR。我正在使用IntelliJ Idea 12,尝试使用Android 4.1.2和2.3.3模拟器。

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.

但是如果你发现Eclipse解决方案适合你,那么有一种方法可以附加到IntelliJ调试器中正在运行的进程。首先,您只需“运行”该应用程序,然后使用这些步骤将调试程序附加到该应用程序。我在小部件的onUpdate()方法中设置了一个断点,它运行成功。