As add on to Stephen's answer, you might want to run your app first on
the emulator to see whether the problem is independent from your
device.

After using DDMS which is part of the Android Eclipse environment, you
want to check the logcat for exceptions.

Example: The Exception below is telling me that I am using an Intent
for which I would need permissions.

08-06 10:29:53.553: ERROR/AndroidRuntime(413):
java.lang.RuntimeException: Unable to start service
com.cc.callcontrolserv...@4311b140 with Intent
{ action=com.ptt.START_CCS }: java.lang.SecurityException: Permission
Denial: starting Intent { action=android.intent.action.CALL data=tel:
9785551212 flags=0x10000000 comp={com.android.phone/
com.android.phone.OutgoingCallBroadcaster} } from ProcessRecord
{4342c5c0 413:com.tmobile.osdc.ptt/10039} (pid=413, uid=10039)
requires android.permission.CALL_PHONE
08-06 10:29:53.553: ERROR/AndroidRuntime(413):     at
android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2565)
08-06 10:29:53.553: ERROR/AndroidRuntime(413):     at
android.app.ActivityThread.access$3100(ActivityThread.java:112)
08-06 10:29:53.553: ERROR/AndroidRuntime(413):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1753)
08-06 10:29:53.553: ERROR/AndroidRuntime(413):     at
android.os.Handler.dispatchMessage(Handler.java:99)
08-06 10:29:53.553: ERROR/AndroidRuntime(413):     at
android.os.Looper.loop(Looper.java:123)


Another helpful way to debug your code is to add additional debug
prints. Also the tool traceview is very helpful which gives you a
stack trace of methods you are calling.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Aug 6, 11:13 am, Stephen Dickey <[email protected]> wrote:
> I can think of a few ways to start... use the debug perspective in eclipse
> to break and step through code, after attaching to you process in the dmss
> perspective.
>
> And use the logcat window, adding tagged log statements to your source
> code.  And don't forget, handling and printing your exceptions.
>
> I recommend using the eclipse tutorial and android hello world to get
> started... and a lot of google searches.
>
> On Aug 6, 2009 8:35 AM, "Declan" <[email protected]> wrote:
>
> Hi,
> My app is crashing, How do I debug it?
> I'm using a HTC Magic and eclips.
> I looked in the documentation, but it doesn't say how to go about
> doing it.
> Thanks,
> -Declan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to