Is there anyway that I could set the DDMS, so that it could capture exceptions from non-ui thread in eclipse? It took me long enough to realize that if an exception occur in non-ui thread, the program won't be effected much, at least in my case. Basically I have the following code:
new Thread(new Runnable(){
public void run(){
A.errorMethod();
}
}).start();
When I run the app,it just halt while doing errorMethod, but there is no exception message shown. After I took the A.errorMethod(); part out and run it directly, I got the except开发者_Go百科ion message in Logcat, weird.
try to let the debugger bind to the thread using:
new Thread(new Runnable(){
public void run(){
Debug.waitForDebugger();
A.errorMethod();
}
}).start();
精彩评论