title: Debug app with 'Debug as Android Junit Test' within Robotium test
body: <p>I am new to Android and Robotium.<br>
  I can not figure out why my 'Debug as Android Junit Test' on Robotium test class does not work when putting breakpoint inside the application code which is under test.<br>
  When I say 'Debug as Android Junit Test' on Robotium test class and have breakpoints only inside my Robotium test class, but not inside my apps classes, then everything works fine.<br>
  On the other hand, when putting breakpoint inside apps code, then executing the line of Robotium test, which calls apps code which has a breakpoint set (in my case presses a button and the breakpoint is inside buttons onClick() method), does not stop on that breakpoint, instead it just runs over it.<br>
  App is frozen on my AVD and when letting the Robotium test to continue then I get test failure:</p>
  
  <pre><code>junit.framework.AssertionFailedError: CheckBox is not found!
  at com.robotium.solo.Waiter.waitForAndGetView(Waiter.java:536)
  at com.robotium.solo.Checker.isButtonChecked(Checker.java:46)
  at com.robotium.solo.Solo.isCheckBoxChecked(Solo.java:2145)
  at example.test.TestMe.testRun(TestMe.java:88)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
  at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
  at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
  at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
  </code></pre>
  
  <p>I am guessing it is happening because the application hangs on avd on some activity and Robotium test continues with testing, but can not press the check box on the screen which it expects to be there. That happens because app hangs on AVD and did not render expected UI or invoked certain Activity which follows.</p>
  
  <p>I also tried adding in my apps Mannifest.xml file </p>
  
  <pre><code>&lt;application
      ...
      android:debuggable="true" &gt;
  </code></pre>
  
  <p>but it did not helped.</p>
  
  <p>Any kind of information and guidance on how to resolve this issue is very much appreciated.<br>
  Thank you in advance,<br>
  mismas</p>
  
  <p>EDIT: 
  Discovered that when putting the breakpoint into the apps code outside the buttons onClick() method (e.g at the Activity's onCreate() method which contains the button) than I can debug things normally.<br>
  I do not understand why is this happening? Why the onClick() method of the buttons OnClickListener would trouble it?<br>
  Anyone got some ideas?
  Thanks!</p>