![]() You can either do this by pressing the “DDMS” labeled button on your top right corner or if you can’t find it, then do it by going to “Window->Open Perspective->DDMS”. Once the widget apk is sync’ed and installed onto your emulator/device, switch your eclipse workspace to DDMS mode. Press “debug” on the eclipse menu (or “run” it doesn’t seem to matter) So, all you need to debug your widget code is almost same as what you do for normal applications. So, is it possible or not to debug widget code? and if yes, then is it very difficult? Fortunately, it is possible and very easy to do but just slightly less intuitive and I couldn’t find any information about it at Android developers website and learnt it by just fumbling around for a few minutes so thought of posting here for the benefit of other newbies like me. For widgets, it seems a bit tricky because there is no activity to be launched, so eclipse just syncs your widget’s apk and installs it and that’s it. For normal applications, it is quite simple as when you press “debug” on the eclipse toolbar, it launches the emulator (or connects to existing emulator/device), syncs your application and launches its main activity and puts the control in your hands if you have put a breakpoint. For most new android app developers (like me), it is a bit puzzling how to debug the android widgets or how to put a breakpoint in an android widget code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |