1. Setup IntelliJ with Android (plugin, SDKs etc). 2. Get the Android 13 image for the emulator (important: Android 13), then run the emulator. *Skip this step if you use a physical device.* 3. Make sure you can build the APK. a. `mvn clean verify -P android-debug` using the working directory forge-gui-android/ 4. Use `android-debug` profile for creating the debug version from below in the forge-gui-android/pom.xml 5. Use this maven command: `mvn android:deploy-apk android:run` 6. Look at the emulator (or device), it should say "Waiting for debugger to connect". 7. CRTL+SHIFT+A in IntelliJ and type in `attach android` and click on "Attach Debugger to Android Process". 8. Tick "Show all processes" and you should be able to pick `forge.app` from the list and click "Okay". 9. Ready to debug Profile XML for debugging: ``` android-debug true true target\forge-android-${snapshot-version}-aligned-debugSigned.apk apk exec-maven-plugin 3.4.1 org.codehaus.mojo SignV2 verify exec ${pom.basedir} java -jar ${pom.basedir}/tools/uber-apk-signer.jar -a ${pom.basedir}/target/ --debug com.github.cardforge.maven.plugins android-maven-plugin javax.xml.bind jaxb-api 2.3.1 com.sun.xml.bind jaxb-impl 2.3.4 sun misc 1 system ${pom.basedir}/libs/sun-misc.jar 4.6.2 true false ${androidPlatform} ${androidBuildTools} true ${project.basedir}/assets ${project.basedir}/res ${project.basedir}/libs true false ${project.basedir}/proguard.cfg ${pom.basedir}/tools/proguard.jar false d8 26 ${build.min.memory} ${build.max.memory} true ${build.min.memory} ${build.max.memory} --min-sdk-version=26 update-manifest manifest-merger se.bjurr.gitchangelog git-changelog-maven-plugin 2.2.0 false GenerateGitChangelog generate-sources git-changelog true ```