7

It would be great if we can debug Android apps on Windows Subsystem for Android.

2

1 Answer 1

14

Of course that is possible, it works similar to any external device.

First enable Developer mode in Windows Subsystem for Android Settings application. Windows Subsystem for Android settings application

pic

Then, connect ADB either like adb.exe connect 127.0.0.1:58526 or adb.exe connect <that ip assigned to your WSA device> once connect, just proceed as usual.

Go to Run -> Select Device Android Studio select device menu

pic2

If ADB had connected correctly, it will be listed there as Microsoft Corporation Subsystem for Android(TM) List of devices available to connect to in Android Studio

pic3

And that's it, it will be available as target the external device to debug with. Android Studio and WSA

pic4

Now you can compile and Debug (Shift+F9) from Android Studio and Windows Subsystem for Android launching it and pausing accordingly (breakpoints, exceptions, etc.) Debugging APK from Android Studio with WSA

pic5

Debugging APK from Android Studio with WSA

pic6

If you want to tweak more the debugging settings, you can launching its View in WSA from that Settings application. WSA more debugging settings from within the Android instance itself

pic7

Sign up to request clarification or add additional context in comments.

1 Comment

Do you know where it is now (the IP and port)? It's not there anymore

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.