I am just switching from Eclipse to Android Studio and found this weird behavior. When I add a breakpoint in the first line of a method, I cannot see the parameter values. The only thing I can see then is the this
reference. I either have to make one debug step or set the breakpoint to a line after the first one to see the parameter values.
Anyone else has this problem or knows what's going wrong here?
Hover over a variable to see its value. The most commonly used way to look at variables is the DataTip. When stopped in the debugger hover the mouse cursor over the variable you want to look at. The DataTip will appear showing you the value of that variable.
To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.
Try turning off your jacoco test coverage off for the debug build in your build.gradle file:
debug { ... testCoverageEnabled false }
This completely fixed the issue for me where upgrading the gradle plugin did not.
A good solution until AOSP Issue #123771 is solved, is to use the snippet provided by Stuart in the comments section:
buildTypes { debug { [...] testCoverageEnabled true } release { [...] } debuggable.initWith(buildTypes.debug) debuggable { testCoverageEnabled false } }
This way you can both keep your test coverage reports in your debug build and have a way of stepping through code seeing your local variables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With