title: How to debug when running Robolectric tests in Android Studio?
body: <p>I need to run debug while my tests execution in Android Studio + Robolectric.
  Each time I try to run them by selecting <code>debug</code> for the <code>test</code> task from Gradle tasks I get the error message:</p>
  
  <blockquote>
    <p>Error running package_name:app_name [test]: Unable to open debugger
    port : java.net.SocketException "Socket closed"</p>
  </blockquote>
  
  <p>Any ideas?</p>