简体   繁体   中英

How to Debug in Android Studio?

How can I

  1. Set a breakpoint.
  2. Stop on Breakpoint.
  3. Release, but leave in debug mode. By release, I mean don't step to next line. Jump to next breakpoint. Or just wait until a breakpoint is hit

I have no time or desire to go diving into the SDK classes. 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)"

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 . Other options include suspending the whole app, or just the thread that encountered the breakpoint. 在此处输入图片说明

Buttons going down the left

  • Resume
  • Pause
  • Stop
  • View breakpoints
  • Mute breakpoints

Buttons across the top

  • Show execution point
  • Step over
  • Step into
  • Force step into
  • Step out

调试器

您应该执行以下操作以启用调试器选项 - https://developer.android.com/studio/debug

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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