When I debug my Android programs on a real device (HTC One S) using Eclipse ADT the last element in the stack trace is always "<VM does not provide monitor information>". This means I don't get to know what part in my code caused the exception. Is there any way to get this information?
Example stack trace:
Thread [<1> main] (Suspended (exception IllegalStateException))
<VM does not provide monitor information>
Choreographer.doCallbacks(int, long) line: 563
Choreographer.doFrame(long, int) line: 529
Choreographer$FrameDisplayEventReceiver.run() line: 719
Handler.handleCallback(Message) line: 615
Choreographer$FrameHandler(Handler).dispatchMessage(Message) line: 92
Looper.loop() line: 155
ActivityThread.main(String[]) line: 5454
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 511
ZygoteInit$MethodAndArgsCaller.run() line: 1029
ZygoteInit.main(String[]) line: 796
NativeStart.main(String[]) line: not available [native method]
If you have Eclipse set up to break on unhandled exceptions, Eclipse breaks before LogCat gets a chance to log stuff.
The main options that I am aware of are:
Do not break on unhandled exceptions in the first place, or
Press the "Run" option in the debug toolbar to proceed past Eclipse's breakpoint, so LogCat can log the exception
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.