Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 545
MuayThai Avatar asked Oct 02 '15 07:10

MuayThai


People also ask

What is debug app in Android Studio?

The debugger is an essential tool that lets you inspect the execution of the code that powers your Android app so that you can fix any bugs in it. It lets you specify points at which to suspend the execution of the code and manually interact with variables, methods, and other aspects of the code.

Can we debug APK in Android Studio?

Android Studio 3.0 and higher allow you to profile and debug APKs without having to build them from an Android Studio project. However, you need to make sure you're using an APK with debugging enabled. To start debugging an APK, click Profile or debug APK from the Android Studio Welcome screen.


2 Answers

you should do the followings to enable the debugger option - https://developer.android.com/studio/debug

like image 136
Mohamed Sajjadh Avatar answered Oct 21 '22 07:10

Mohamed Sajjadh


The top left button in the debug window (the green triangle) is doing what you want. "Resume Program (F9)"

like image 22
Henry Avatar answered Oct 21 '22 08:10

Henry