Eclipse and Android development - a few noob questions
I've tested deployment to Android Market already as a test, seems like everything is hooked up fine - but now getting a little deeper into java and need to figure out how to use the Eclipse IDE.
I'm having exceptions, but where can see the excep开发者_JS百科tion message?.. it's not showing up in my consoles , not even the java stack trace console while in debug mode?
URLConnection uconn = null; try { uconn = u.openConnection(); catch (IOException e) { e.printStackTrace(); x = x + e.toString(); }
Where does this output, not seeing it in any of the consoles. How can I output to console?
System.out.println("-----------------hello");
I can open up the view variable windows, but see no variables there, how do I add them into that so I can see their values, are they only they only visible if I add a line breakpoint? btw, what's the function key to step to next breakpoint?
- Android exceptions are usually visible at LogCat view, it is available at DDMS perspective or you can add it through menu Window -> Show View -> Other.. -> Android
- You'd better use log feature if you need to output something for debugging
Log.i("some tag", "message");
The log message is then visible at the LogCat view. - You need to stop at a breakpoint to see current value of variable, otherwise that makes not sense. Function keys from F5 till F8 are used to manipulate the flow. Usually F8 will bring you to the next breakpoint.
精彩评论