如果我们可以在Windows Subsystem for Android上调试Android应用程序,那就太好了。
发布于 2021-10-24 15:37:00
当然,这是可能的,它的工作原理类似于任何外部设备。
首先在Windows子系统中为Android设置应用程序启用开发人员模式。Windows Subsystem for Android settings application
然后,像adb.exe connect 127.0.0.1:58526
或adb.exe connect <that ip assigned to your WSA device>
一样连接ADB一旦连接,就像往常一样。
转至Run -> Select Device Android Studio select device menu
如果ADB连接正确,它将被列为Microsoft Corporation Subsystem for Android(TM)
List of devices available to connect to in Android Studio。
仅此而已,它将作为调试外部设备的目标。Android Studio and WSA
现在您可以从Android Studio和Windows Subsystem for Android编译和调试(Shift+F9),启动它并相应地暂停(断点、异常等) Debugging APK from Android Studio with WSA
Debugging APK from Android Studio with WSA
如果您想要调整更多的调试设置,您可以在WSA中从该设置应用程序启动它的视图。WSA more debugging settings from within the Android instance itself
https://stackoverflow.com/questions/69685615
复制相似问题