在android studio中新建默认的android应用app。
![android studio怎么调试应用程序](http://www.tagxp.com/uploads/allimg/c170603/149642124S2K0-15204.png)
点击菜单栏的;Run”-;Attach debugger to Android process”。
![android studio怎么调试应用程序](http://www.tagxp.com/uploads/allimg/c170603/149642124TY30-21V7.jpg)
然后会打开;Choose Process”窗口。选中要调试的进程,然后点击ok。
![android studio怎么调试应用程序](http://www.tagxp.com/uploads/allimg/c170603/149642124Ub60-35D6.png)
步骤阅读
4console中会输出:Connected to the target VM, address: 'localhost:8601', transport: 'socket'。说明已经可以进行调试。
![android studio怎么调试应用程序](http://www.tagxp.com/uploads/allimg/c170603/149642124W1610-42503.jpg)
5在MainActivity的第14行打断点,然后运行程序,可以看到程序停在断点上。
![android studio怎么调试应用程序](http://www.tagxp.com/uploads/allimg/c170603/149642124X3040-543B.png)