24 Responses

  1. Scott
    Scott at |

    Thanks brother! I can’t press Run or Debug because my Widget project contains no default activity. I am having to install (and reinstall a million times) the APK through the Device manager and then I can effectively get to the debug you mention in the DDMS view. How are you able to press run on your Widget project?

    Peace,
    Scott

  2. Scott
    Scott at |

    Thanks brother! Do you understand the Intent/PendingIntent? When I add an “extra” (the widget id) to an intent wrapped in a PI attached to a widget instance, it appears all the widget instances share the last widget’s id. Are these intents shared or something?

    Scott

  3. Debugging Android Widget « Tales of an Ex-Googler

    […] Debugging Android Widget Posted in Uncategorized by jeansworld on October 20, 2010 Debugging your widget is not quite as automated as debugging a regular application, but luckily it’s not too difficult either. You just have to know what to do…so here are the instructions, from Shantanu’s Technophilic Musings […]

  4. Lakshmana
    Lakshmana at |

    Hi
    I did what you suggested. But pressing the green bug in DDMS is not doing anything for me. My widget does not have a activity. Only a service. How to debug.

  5. Lakshmana
    Lakshmana at |

    It works now. But only when I include an activity in the widget and I put a breakpoint in the activity code. I cannot achieve a breakpoint in the onupdate() and the service.

  6. Melinda Green
    Melinda Green at |

    Great tip, thanks! I’d never have figured that out.

  7. Omkar S. Bapat
    Omkar S. Bapat at |

    Thanks a ton bro! Really helped a lot.

  8. Roey
    Roey at |

    Hi,

    Thanks….. i have been strugeling with that few hours.
    Great Tip.

  9. Sergii
    Sergii at |

    Thanks a lot! It helps me find my stupid error 🙂

  10. Marol
    Marol at |

    i just confused where is the error if i press DDMS??can anybody tell me?

  11. 攻殻程序隊 〜Wizard in the Market〜 - Android Widget の開発にてEclipseでデバッグするには・・・

    […] How To Debug Android Widgets通常のAndroid Appではeclipseの虫ボタンを押すだけでデバッグが始めれるのですが、Widgetの開発では、デバックする方法が簡単には見つからない・・・。ってことでグーグル先生に相談してみました。んで、見つけたサイトが冒頭のリンクです。簡単にその内容の説明。 […]

  12. Jeyankondan
    Jeyankondan at |

    Thanks a lot…

  13. Mark Lapasa
    Mark Lapasa at |

    Hey man, thanks for this post. I wish widgets were as trivial as native android apps. I would expect it to be a natural extension of an app but it’s variant on it own.

  14. Alastairx
    Alastairx at |

    Thanks! You just ended a very frustrating hour trying to work out why my live wallpaper was not hitting any breakpoints! 🙂

  15. Balint
    Balint at |

    Hi and thanks for the article. Could you try to help me out on that one: when the execution of my widget code stops on a breakpoint, within a couple of seconds, the Android system seems to decide to kill my process, as it is not responding. I’m getting a “W/ActivityManager(59): Scheduling restart of crashed service […]” message in the logs.

  16. Steven
    Steven at |

    So easy. I’m new in Widget and wonder why I can’t debug my project and now you show me how. Thanks in advanced.

  17. mobibob
    mobibob at |

    That worked! Unfortunately, my bug is occurring in “super” so I still don’t know what is wrong. More code review 🙁

  18. Siebe
    Siebe at |

    So… any chance you know how I can debug widgets in IntelliJ?

  19. Debugging Android Widget In Intellij IDEA

    […] debugging widget, every breakpoint causes ANR. There is solution for Eclipse, but I can’t find solution for […]

  20. Nguyen Nam
    Nguyen Nam at |

    Thanks for great sharing.

  21. Bill Roth
    Bill Roth at |

    Is there any way to do a auto deployment? Your posting seems to suggest you have to manually install each time.

  22. azerto00
    azerto00 at |

    Thank you !
    You were right, it’s not easy to find this information.

Comments are closed.