Debugging Widget causes ANR

Posted by Salv0 on Stack Overflow See other posts from Stack Overflow or by Salv0
Published on 2011-01-07T13:51:36Z Indexed on 2011/01/07 13:53 UTC
Read the original article Hit count: 150

Filed under:
|
|

I'm trying to debug an AppWidget but I incurred in a problem :D

I placed a breakpoint on the top of the method:

    public void onReceive(Context context, Intent intent) {
    Log.v(TAG, "onReceive 1"); // BP on this line
    super.onReceive(context, intent);
    String action = intent.getAction();

    // Checks on action and computations ...

    Log.v(TAG, "onReceive 2");
    updateWidget(context);
    Log.v(TAG, "onReceive 3");
}

The breakpoint stops the execution as expected but then the process dies. The problem is that the breakpoint ( I guess xD ) cause an ANR and the ActivityManager kills the process. That's the Log:

01-07 14:32:38.886: ERROR/ActivityManager(72): ANR in com.salvo.wifiwidget
01-07 14:32:38.886: INFO/Process(72): Sending signal. PID: 475 SIG: 9
......
......
01-07 14:32:38.906: INFO/ActivityManager(72): Process com.salvo.wifiwidget (pid   475) has died.

This cause the debug to stop. So the question is: there's a way to debug the widget without incurring in the ANR?? thanks in advance for the answers

© Stack Overflow or respective owner

Related posts about android

Related posts about eclipse