How to properly debug Java (Android) using Eclipse?

I'm having trouble debugging my code. One of my AsyncTasks throws a RuntimeException, but I don’t know which line in my code is responsible for this. Since I'm new to Eclipse and Java in general, all of this pretty confuses me.

The Eclipse debug window shows me that my AsyncTask is paused due to a RuntimeException. Below, there are three lines that indicate some lines of code. However, these lines do not exist in my code, so I do not know what causes my application to crash. Is there something substantial missing for debugging in Java / Android?

Here are three lines that are given to me, by the way:

ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1086  
ThreadPoolExecutor$Worker.run() line: 561   
Thread.run() line: 1096 

How should I work with this? Help would be greatly appreciated.

+5
source share
3 answers

in ddms you can get a message related to an error message, warning, or another type of message in the logcat window, if you cannot find logcat in ddms, then go to Window-> Show View-> logcat, click on it, and now you you can see the message in the same ddms as the window of the device that selects the device for which you can debug or receive a message from this device in the log file.

now check this method to find detailed error information in this logcat information.

+1
source

logcat - stacktrace . , DDMS, , logcat, , .

. Pratik , Eclipse.

+1

- , , , , . , , .

0

All Articles