Debug AppWidget


Last Updated:

  1. dpak23in

    dpak23in Member This Topic's Starter

    Joined:
    Mar 4, 2010
    Messages:
    8
    Likes Received:
    0
    Hello,

    I need to know how can we debug an AppWidget. It is easy to debug any code which has an activity that is launched every time we run the application. But AppWidget does not have an activity and thus is not launched from eclipse. It just gets synced on the device and then we can run this widget by clicking on its name in the widget menu on the emulator. I believe that after syncing over to the emulator there is no connection whatsoever between eclipse and emulator. Is there any other way which can help me debug appWidget?

    Thanks
    Deepak
     

    Advertisement
  2. Zero

    Zero Member

    Joined:
    Oct 23, 2009
    Messages:
    11
    Likes Received:
    2
    You debug it the same way as you would with an activity. Set breakpoint, start the debugger on the process and do something to which causes the code with breakpoints to run. E.g. put the breakpoint on the first line after onUpdate() and add your widget to the homescreen.
     

Share This Page

Loading...