To make debugging possible, Android supports the Java Debug Wire Protocol (JDWP). This is a technology that allows tools such as ADB to communicate with a JVM. While JDWP is important during development, it should be disabled prior to the applicaiton being published.
JDWP can be the value of the
android:debuggable attribute in an Android application. Xamarin.Android provides the following ways to set this attribute:
- Created a
AndroidManifext.xmlfile, and setting the
- Including the
.CSfile like so :
If both the
ApplicationAttribute are present, the contents of
AndroidManifest.xml take priority over what is specified by the
ApplicationAttribute, then the default value of the
android:debuggable attribute depends on whether or not debug symbols are generated. If debug symbols are present, then Xamarin.Android will set the
android:debuggable attribute to
Note that the value of the
android:debuggable attribute does NOT necessarily depend on the build configuration. It is possible for release builds to have the
android:debuggable attribute set to true.