[英]How to Debug in Android Studio?
How can I我怎样才能
I have no time or desire to go diving into the SDK classes.我没有时间也不想深入研究 SDK 类。 I just want out after I have stepped through a few lines.我只是想在我跨过几行之后离开。 So far the only thing I have been able to do is just killing the debug session.到目前为止,我唯一能做的就是终止调试会话。 Where is the "RELEASE" button to just move on?继续前进的“释放”按钮在哪里?
I mean to me this is just obvious.我的意思是对我来说这很明显。 You don't want to step deeper and deeper into the code.您不想越来越深入地了解代码。 Once your done looking just resume into debug mode.完成查找后,只需恢复到调试模式即可。 Wait until you hit another break point.等到你遇到另一个断点。 How do I do this?我该怎么做呢? Can it be done?可以做到吗? And why is there no button for this?为什么没有这个按钮?
Just resume, stay in debug mode.继续,保持调试模式。 How do you do this?你怎么做到这一点?
The top left button in the debug window (the green triangle) is doing what you want.调试窗口左上角的按钮(绿色三角形)正在执行您想要的操作。 "Resume Program (F9)" “恢复程序(F9)”
Breakpoints are toggled by clicking in the narrow column to the left of the code.通过单击代码左侧的窄列来切换断点。 You can also have conditional breakpoints, for example by right clicking the red spot I could enter someVariable > someOtherVariable
.您还可以设置条件断点,例如通过右键单击红点,我可以输入someVariable > someOtherVariable
。 Other options include suspending the whole app, or just the thread that encountered the breakpoint.其他选项包括挂起整个应用程序,或仅挂起遇到断点的线程。
Buttons going down the left向左下降的按钮
Buttons across the top顶部的按钮
您应该执行以下操作以启用调试器选项 - https://developer.android.com/studio/debug
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.