Unreal Engine (UE) supports debugging with the Android Game Development Extension (AGDE) Plugin for Visual Studio, which provides debugging and profiling tools for Android projects in Visual Studio without the need to switch environments to Android Studio. This is the recommended debugging environment for Android projects in UE for Windows users.
This guide will walk you through the process of downloading and enabling this plugin, and provide links to helpful resources for using it.
1. Downloading and Installing the AGDE
To install the AGDE plugin and set up your project's solution to work with it, follow these steps:
-
Make sure you have installed Visual Studio 2019 and are using it as your default Visual Studio version for Unreal Engine.
-
Download the AGDE plugin from the [Android Developer page](https://developer.android.com/games/eap/extension](https://developer.android.com/games/eap/extension).
-
Install the AGDE Plugin to Visual Studio.
-
Locate the .uproject file for your project, right-click it to open the context menu, then click Generate Project Files to regenerate your Visual Studio solution.
The new solution files will have the plugin enabled by default.
1A. Setting Up JDK
When you open Visual Studio, you may see an error stating that your JDK installation is not the correct version. This will prevent Unreal Automation Tool (UAT) from packaging projects due to gradle errors.

Follow these steps to install the correct version:
-
Download the required version of Java SE from the Java SE Archives. For example, if the Visual Studio error says you need JDK 11, download Java SE 11.
Do not install a newer version of JDK than the one recommended in Visual Studio, as there may be compatibility issues.
-
After your download completes, install Java SE to your computer. Take note of the directory where you installed it.
-
Open the Search Bar and find Edit the System Environment Variables. Click this option to open the System Properties dialog.
-
Click the Environment Variables button.
-
Select the
JAVA_HOME
environment variable (if available), click Edit, and set the directory to the location where you installed JDK. -
Reboot your computer so the environment variable changes take effect.
Once you have finished, your computer will now use a version of JDK that is compatible with the AGDE plugin.
2. Launching a Project With AGDE
AGDE can debug or attach to Unreal Engine applications on your Android device. This requires you to set some configuration options in Visual Studio, and you also need to package an APK before using AGDE, as it can compile your Android project's code but can not cook content. Follow these steps to launch your project on your device.
-
Use the BuildCookRun command to package your project for Android. You can also use Turnkey or the Platforms dropdown in Unreal Editor.
Refer to Build Operations and Cooking Content for more information about the cooking and packaging process.
-
Open your project's Visual Studio solution.
-
Set your Solution Configuration to DebugGame and your Solution Platform to Android.
-
Plug the Android device you want to test with into your computer with a USB cable. When the device asks if you want to grant permission for USB debugging or permission for the computer to access the device's data, grant it.
When using a USB connection, make sure the cable and port on your computer both support data.
-
The button to build and debug your project should now display the device's name. Either click it or press F5 to begin debugging. You may need to wait for the debugger.
If you encounter a SIGILL error, press F5 to skip through the error and continue running AGDE.
The project will build and launch on your device, and you will be able to use Visual Studio's debugging tools just like you would for a Windows application.
3. Attaching AGDE to an Application
To attach to a running instance of your Unreal Engine application, follow these steps:
-
Click the Debug dropdown in the toolbar, then click Attach to Process.
-
Set the Connection Type to Android Game Development Extension.
-
Click the Connection Target dropdown and click the entry for your device.
-
Select the process for your application, then click Attach.
More Information
For more information on AGDE's features, refer to the following documentation:
-
Overview: https://developer.android.com/games/agde
-
Project Configuration: https://developer.android.com/games/agde/adapt-existing-project
-
Debugger Guide: https://developer.android.com/games/agde/debugger