debug messages: ensure that onPause and onResume are called