Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / How to debug C++ (jni / agk code) code in Eclipse ?

Author
Message
Alain91
7
Years of Service
User Offline
Joined: 20th Aug 2011
Location: France
Posted: 3rd Jan 2013 22:11
Hello everybody,

I am able to compile a complete project, at last.
A long long way to achieve..

Now I would like to debug the agk code, using breakpoints, ...

When I run in debug mode, the (real) android device tell that it is waiting for the debugger, wait 2 seconds, then continue running.
Even If I add breakpoints, they are ignored..

The debugger seem to have control on the device : I can get snapshots, stopping the programm from the eclipse debugger perspective.

When compiling the C code, I use

ndk-build NDK_DEBUG=1

in cygwin.

No more breakpoints ..


I added

<uses-permission android:name="android.permission.SET_DEBUG_APP"></uses-permission>

in android manifest.xml

No more effect..

Any help please ?..

Thanks a lot,
Alain
JimHawkins
9
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 4th Jan 2013 00:50
That's a very interesting question. I don't have any answers, but we'll all be grateful for any info you have as you explore!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Alain91
7
Years of Service
User Offline
Joined: 20th Aug 2011
Location: France
Posted: 4th Jan 2013 18:15
It seems that the ds-5 debugger should work :

http://www.arm.com/products/tools/software-tools/ds-5/community-edition/ds-5-community-edition-install.php

The c++ code can't be traced with the java debugger that is shipped with eclipse.
So we need an arm debugger.

This is the theory, ans as usual with android, it is not simple, and after a day, I am always confused..

If someone could help us...

Alain
Alain91
7
Years of Service
User Offline
Joined: 20th Aug 2011
Location: France
Posted: 6th Jan 2013 14:28
Some news !

With the arm link i gave before, and some patience, I am now able to debug c++ code with ds-5 debugger.

I got problems with ds-5 not founding my android device.
It seems that the adb server was not running..

I included the path to the adb executable to my windows path, and launched "adb start-server" command

Ds-5 now find my device, and I can launch debug session from eclipse.
A great thing

I have another problem (android ) :
The ds-5 debugger launch the apk, but it miss the agk launch and so it stops the application after several seconds of running time....

I can debug the apk, use breakpoints, inspect variables, but after several seconds of running time..

Any help is welcome..

Regards,
Alain

Login to post a reply

Server time is: 2019-07-16 09:13:07
Your offset time is: 2019-07-16 09:13:07