简体   繁体   English

如何使用离子调试Android模拟器?

[英]How to debug Android emulator with ionic?

Using ionic, I am writing an app which I am trying to test with an Android emulator. 使用ionic,我正在编写一个应用程序,并尝试使用Android模拟器进行测试。 I can successfully build and even add the app to the emulator but when I click the app it immediately dies before even loading the home page. 我可以成功构建甚至将应用程序添加到模拟器中,但是当我单击该应用程序时,它甚至在加载主页之前就死了。

Is there anyway to debug this? 反正有调试吗? I have tried running consolelogs and serverlogs but nothing is getting outputted. 我试过运行consolelogs和serverlogs,但是没有输出任何信息。 I have also tried debugging through Chrome ( https://developer.chrome.com/devtools/docs/remote-debugging ). 我还尝试通过Chrome进行调试( https://developer.chrome.com/devtools/docs/remote-debugging )。 But even though the device shows up in the list it does not have any of the options such as 'inspect', 'focus tab', 'reload', nor 'close'. 但是,即使设备显示在列表中,它也没有任何选项,例如“检查”,“焦点选项卡”,“重新加载”或“关闭”。 It just displays the emulator's name. 它仅显示仿真器的名称。

Run adb logcat in a separate terminal. 在单独的终端中运行adb logcat

As you run the emulator your terminal should populate with logs. 运行模拟器时,终端应填充日志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM