Home » Android » Android Studio Not able to debug

Android Studio Not able to debug

Posted by: admin November 1, 2017 Leave a comment

Questions:

The log cat does not show anything.Clicking on the debug button does’t do anything different.

my console

Answers:

What you are looking at is the Console, not LogCat. It is a separate tab in Android Studio.

Try pressing Alt+6 on Windows or CMD+6 on Mac.

Questions:
Answers:

look at the debug menu in the toolbar of android studio beside run , after selecting your breakpoint ,hit that button then open debugger console ,this should work.

did you select breakpoint ? if you just want to see the Log messages then you should see Andorid Monitor , if you want to debug then you have to select breakpoint

Questions:
Answers:

Open Android Monitor, and look for a tab named Logcat. This is where logs are printed. You can use stdout logs as well as stderr.

Questions:
Answers:

For open the LogCat :

  • on Windows or Linux : Alt+6
  • on MacOS : command+6
Questions:
Answers:

First you will have to set a breakpoint in your android studio. A breakpoint is a point in your code where you want the app to pause waiting your reaction like seeing variables value and the app in your device or virtual device will also pause as well. By default android studio should open the debugger tab when it finds a break point.


So this is how you set a break point:
Go your code may be in an Activity find a line of code you want to debug in your app (The one close to or the one which you think it brings the error).
In android studio there are line numbers column on the left just go there and just right of that particular number click once and the red dot will appear. Thats your breakpoint. Then just do the same for any other line you want to debug.
After that just click on the Button for debugging. In case you dont know it go to the tab Run and choose the Debug app. And now when you run your app will pause in your breakpoint and you will read all variables.