简体   繁体   English

如何在Exclipse中调试Android App?

[英]How to debug Android App in Exclipse?

Ok. 好。 So while this isnt a programming question. 因此,尽管这不是编程问题。 I wanted to know how do people debug apps? 我想知道人们如何调试应用程序? How do you view log cat, and where these exceptions are thrown etc? 您如何查看日志猫,以及在哪里抛出这些异常等? And do I need to run the app on the emulator to see all the stuff, or is there a way to view this after running the app on my phone(while not being connected to the computer) 我是否需要在模拟器上运行该应用程序以查看所有内容,还是在手机上运行该应用程序后(未连接到计算机)是否可以查看此内容?

Links to plugins and tips would be really helpful, as im gonna start work on my next game, and while the first one works fine, had a lot of problems while debugging. 链接到插件和技巧将非常有帮助,因为我将开始开发我的下一个游戏,尽管第一个游戏运行良好,但调试时存在很多问题。

Setup: download the Android Developer Tools (ADT) plugin for Eclipse from here http://developer.android.com/tools/index.html 设置:从此处http://developer.android.com/tools/index.html下载适用于Eclipse的Android开发人员工具(ADT)插件

To debug: 要调试:

  1. Connect your phone to PC via USB 通过USB将手机连接到PC
  2. Open Eclipse, set breakpoints wherever you need 打开Eclipse,在需要的地方设置断点
  3. Run -> Debug to relaunch your app in debug mode 运行->调试以调试模式重新启动您的应用
  4. Use the Debug perspective, see: http://developer.android.com/tools/debugging/debugging-projects.html 使用“调试”透视图,请参见: http : //developer.android.com/tools/debugging/debugging-projects.html

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

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