-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all samples should include configuration and instructions for JNI debugging #20
Comments
I am trying to debug some native code using Android Studio 1.3 (preview) with the new NDK support. My
For gdb I constantly get
For lldb it cannot get a handshake. Do I miss something in my |
@kneth can you file a separate issue on https://code.google.com/p/android/issues/entry?template=Tools%20bug%20report so that we can track the RC 1 debugging issue separatly? This issue is more about updating the the gradle files for the sample to add debug configuration. |
@kneth (Note that lldb worked for me, albeith slow):
A limitation of the current RC is that you can't debug native code on init, this is fixed with: |
@proppy I'll give lldb a second try. I have submitted bug https://code.google.com/p/android/issues/detail?id=179694&thanks=179694&ts=1436779249 |
Closing this as with If you want to debug the release build you need to add:
|
Reopening since it would be nice to have step by step instructions to setup debugging on a project in each README. Related #54 |
it works for me. |
@GiantGeorgeGo Works like in native debugging? Or just compiling? |
@GiantGeorgeGo are you using experimental plugin or android plugin for gradle? |
@GiantGeorgeGo experimental plugin is the one supported right now: all samples here are using the experimental plugin. |
jniDebuggable doesn't exist anymore with gradle-experimental:0.4.0-alpha2 |
@WhiteSEEKER It's part of the 'ndk' configuration block now. e.g.
The debug build should have ndk debuggable by default. |
reopening, we should call that out more explicitly in the README.md file or point to http://tools.android.com/tech-docs/new-build-system/gradle-experimental |
This should also include something about switch to the native run configuration |
I can rarely debug. Most of the time I have: Now Launching Native Debug Session Client not ready yet..Connected to process 16172 on device XXXXX With AS 2.0 preview Also I don't see anymore the switch between lldb and gdb, a bit like this non-answered stackoverflow question: http://stackoverflow.com/questions/32684845/how-to-switch-between-lldb-and-gdb-in-android-studio |
I updated the issue mentioned in a comment in July after trying AS 2.0 preview - I didn't have much success with debugging :-( |
I actually found the issue I had (And now debugging works for me). |
@WhiteSEEKER's solution works for me as well |
starting to take a look at this one. created #197, please have a look: capture this debugging into a doc. |
right now [version 2.1] debugger is only LLDB for JNI code. closing this one for now. To make the reference.md a useful one is a task: will put energy on it and hopefully could get most of the controls in this doc so less guess work in the future [when write gradle scripts]. In summary:
closing this one, please re-open if we should do it differently. thanks |
Using:
The text was updated successfully, but these errors were encountered: