How to debug in Eclipse? (unhandled exception error)

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

How to debug in Eclipse? (unhandled exception error)

Postby Shifty Geezer » Fri Mar 16, 2012 2:51 pm

As a Droid Noob but moderately experienced programmer, I've successfully worked through the official tutorials (Hello World and Notepad) from the Android developer site. I have just coded the OpenGL 1.0 example and it crashes out the app instantly. So I'm wanting to use the Eclipse debugger to work out what's going wrong, but I just can't make sense of it, and the tutorials I've found on the web don't really explain it.

Firstly, almost every time I step over/through a line, a pane appears asking for source code. It has a button to find the .jar source. I've no idea what to look for or why. I don't want to view source code for the APIs or anything; at the moment I just want to see which instuction is killing the app. Is there maybe a setting or configuration to ignore this?

Secondly, I can't steo through the code to find the offending instruction. I can't add a breakpoint before my main class, and the program appears to be dying right at the beginning before doing anything; maybe on an import? The app launches and then dies with an unhandled exception error, and I've no way of finding out where. Is there maybe a way to add Trace commands to print to a debug log? Or some way to execut the code stepwise fromthe very beginning?
Shifty Geezer
Freshman
Freshman
 
Posts: 4
Joined: Fri Mar 16, 2012 11:13 am

Top

Re: How to debug in Eclipse? (unhandled exception error)

Postby Shifty Geezer » Fri Mar 16, 2012 8:00 pm

A brilliant coder friend of mine found the execution error, which was a wrong name in the manifest. You'd have that one could have been easy enough to provide a decent error message for.
Shifty Geezer
Freshman
Freshman
 
Posts: 4
Joined: Fri Mar 16, 2012 11:13 am

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests