Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging: Android studio causes app to crash, when stepping over to exit a method

I am running Android Studio 2.1.1 and debugging my app on two devices (one emulator on my x86_64 windows 10, the other is my HTC One M8). During debugging, if I step over codes, and when it exists the current method or scope, the program just crashes, without any indication in logcat (I know this because I purposely added a log.d to be the last line, and the last message I got is the content from this log.d before crashing).

However, if I use continue rather than step over, the app just exits the current function fine, without crashing the app.

I have no idea what is going on here, it drastically slows down my development and debugging. Any ideas and suggestions will be appreciated. Please let me know if you need more info, thanks in advance.

like image 551
Joe Avatar asked May 28 '16 04:05

Joe


1 Answers

I'm having a similar issue. However, poking around online, I found this:

https://code.google.com/p/android/issues/detail?id=200880

  • It's a known issue that affects Android 6 (Marshmallow) devices and emulators only.
  • There is no workaround, except to use an Android 4/5/7 device for debugging, or to use 'Continue' instead of 'Step Over'.

If anyone finds a fix/workaround, it would be helpful!

like image 151
siul1979 Avatar answered Oct 19 '22 01:10

siul1979