Chris
Chris

Reputation: 683

Android Studio breakpoint system seems broken

So, I'm getting started with Android Studio targeting a Nexus 9, and so far its been great with the major annoyance being the debugging, setting breakpoints and stepping in/out.

I find my breakpoints are routinely ignored, to the point that I wonder if I'm doing something wrong. As one example, in my contour plot class below my app is behaving as if my "bins" are never initialized. I have a routine that is meant to set up the bins, called "Bins_SetBins." When I debug my app I can get execution to stop on the calling breakpoint (see first figure below), but NOT the breakpoints in the function itself (see second figure below) -- which is consistent with the behavior. In fact, each of the breakpoints in my called function is tagged with an 'X' that says "No executable code found at this line"

What gives? There most certainly is code there, right? Surprising stuff like this is happening all the time... is there some trick to this that I'm not getting? Are lines being optimized away? Is there some mismatch between by call and prototype that makes my subroutine not called (yet doesnt cause a compiler error)?

Thanks for any help.

enter image description here

enter image description here

Upvotes: 4

Views: 1141

Answers (1)

nkz
nkz

Reputation: 144

Adding the answer as you need 50+ rep to comment :-|.

Please check if you have minifyEnabled true in the debug build. Set it to minifyEnabled false for the debug builds.

Upvotes: 2

Related Questions