3

I have Android Studio 1.3.2, NDK r10e, gradle experimental plugin 0.2.0. I have cloned the ndk samples repo and carefully followed instructions for the NDK Preview, including creating a Native configuration.

When I select LLDB as the debugger and debug the Teapot NDK sample app (breakpoint in TeapotNativeActivity.cpp, line 393), the app runs, but breakpoint isn't hit as it should when I rotate the teapot. Using GDB for the debugger results in the app freezing on startup. I then have to force quit the app and press stop in the debugger window.

In both cases, debug controls appear (greyed out), and the variables window says, "Connecting", but I never see the "Waiting for Debugger" dialog on my device.

Console output using LLDB: enter image description here

Console output using GDB: enter image description here

Now, when I do the same thing from Android Studio 1.4 Preview 3, I now get the "Waiting for Debugger" dialog, but it hangs there. It looks like the debugger never connects.

Console output Android Studio 1.4: enter image description here

Is it possible to debug with AS 1.3.2 or 1.4? What do I need to do next to get it working?

Nate
  • 2,449
  • 3
  • 21
  • 29
  • I installed Android Studio 1.3 (stable channel) on Lubuntu 14.04, added a new native debugging configuration and was finally able to debug the C++ code (using LLDB) in the latest teapot sample. – Nate Aug 27 '15 at 17:57
  • Since it worked on Linux with Android Studio 1.3, I thought I'd try that version on Windows, but it still wouldn't stop at my breakpoints in C++. – Nate Aug 27 '15 at 20:43

1 Answers1

1

I upgraded to Android Studio 1.4 beta and the issue is fixed. I can now debug my C++ code.

Nate
  • 2,449
  • 3
  • 21
  • 29
  • that's lame that it's still not working for 1.3 while it was promised. First we need to depend on Gradle Experimental for lated NDK integration and now a beta version of Android Studio ? Sure, let's all be crazy in here ! – Mackovich Aug 31 '15 at 12:41
  • @Nate, on which OS platform your android studio 1.4 is running ? – Pankaj Sep 21 '15 at 07:02
  • Android studio 1.4 is running on Windows 8.1 – Nate Sep 21 '15 at 13:56
  • windows7sp1, android studio 1.5 and experimental:0.4.0 ,I now get the "Waiting for Debugger" dialog, but it hangs there. It looks like the debugger never connects. – Hamid Zandi Dec 28 '15 at 12:46