question: @ Given ( "^I wait for manual attachment of the debugger$" ) public void wait_for_manual_attachment_of_debugger ( ) throws InterruptedException { while ( ! Debug . isDebuggerConnected ( ) ) { Thread . sleep ( 1000 ) ; } }
target:  Wait for the debugger to be manually attached to this running process. Use this to debug test execution by adding this step to your test scenario and when the test is running in Android Studio choose menu "Run - Attach debugger to Android process", finally select the name of your app package from the list of processes displayed.