Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to "Step Into" or "Step Over" code while debugging an app in Android Studio?

I am trying to follow this Debugging with Android Studio.

How do I Step Into or Step Over code?

Under the variables tab in debugger it just shows:
"Connected to the target VM, address: 'localhost:8609',transport:'socket'"

The "Step Into", "Step Over" options are greyed out.
Do I pause execution and then Step Into or Step Over my code?

After I click "Debug 'app'"


2 Answers

By default, step over is F8, step into is F7.

like image 125
James Avatar answered Sep 05 '25 05:09

James


You need for your code to reach your breakpoint, then all debugging options should be available.

App Ready to Debug

My guess is that right now your code is still running in debug mode.
So either you'll have to set a better breakpoint or you'll have to advance your code to the current breakpoint.

Then, the next line to execute will no longer be "Breakpoint Red",
but instead be "Debug Blue" like if (square.getTag() == tag) is below: Line Debug Blue

Yours is still "Breakpoint Red":
Line Breakpoint Red

You can then also use the following keyboard short cuts:
Keyboard Debugging Shortcuts

like image 31
Snostorp Avatar answered Sep 05 '25 04:09

Snostorp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!