I need to debug my application and debug the code is part of Runnable
and do some actions in application then debug the code again, but I can't do it, I can't do any actions as debug point is fired immediately.
code :
public class UpdateHandler {
public static Handler getHandler() {
if (sHandler == null) {
HandlerThread looper = new HandlerThread("update Handler");
looper.start();
sHandler = new Handler(looper.getLooper());
}
return sHandler;
}
}
UpdateHandler.getHandler().post(new Runnable() {
@Override
public void run() {
update();
}
});
public void update() {
// i put the debug point here .
}