Robert de Klerk
Robert de Klerk

Reputation: 624

android debugger

I get an error in the android emulator. "The application AppName has stopped unexpectedly. Please try again.

How do I use the debugger to troubleshoot where the error occurs

Upvotes: 0

Views: 166

Answers (6)

Robert de Klerk
Robert de Klerk

Reputation: 624

I just recompiled after waiting a longgggg while without changing code (I did remove code and a xml file, but undid it with cntl+z) and then it worked without issues - sigh –

Upvotes: 1

coder
coder

Reputation: 10520

I like to use Logcat. Logcat will give you a pretty detailed error message with the lines that the error occurred on. You can open up the Logcat perspective in Eclipse by going:

Window -> Show View -> Other (if Logcat doesn't show in the list) -> Logcat

I prefer this to the debugger because the emulator runs a bit faster.

Upvotes: 0

EricOops
EricOops

Reputation: 449

I am not sure what kind of debugger you want. AFAIK, two debugger can be used in android: ADB and gdbserver. If you want debug java code, you can use ADB. You can issue "adb connect localhost" in shell to make adb connect to your emulator. Then you can use "adb logcat" to see the log of your emulator. Mostly, the emulator will give you log about where the error occurs in your java code.

Upvotes: 1

Saurabh
Saurabh

Reputation: 7964

you should also look at the log file. By default android logs all messages to a log file which you can access on your command line as "adb logcat". For more on adb tool loot at here

Upvotes: 1

DJPlayer
DJPlayer

Reputation: 3294

I don't usually answer with a link.. but honestly this it's probably easiest just to go through the piece of the URL. breakpoints and log events.

http://www.vogella.de/articles/EclipseDebugging/article.html#usedebug_breakpoints

Upvotes: 1

spatulamania
spatulamania

Reputation: 6663

This is a pretty big question. Here is the standard Android documentation for debugging android apps:

http://developer.android.com/guide/developing/debugging/index.html

Upvotes: 1

Related Questions