Nate
Nate

Reputation: 2519

Can't debug NDK samples with Android Studio 1.3.2 on Windows

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?

Upvotes: 3

Views: 1764

Answers (1)

Nate
Nate

Reputation: 2519

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

Upvotes: 1

Related Questions