[Qbs] Debugging Android projects in Qt Creator

Max Bespalov bespalov.maxim.a at gmail.com
Tue Nov 17 14:18:25 CET 2020


Hello,

I'm trying to port our project to the Android using qbs 1.17.1. 
Everything goes well so far, but I don't see any opportunity to debug 
project in Qt Creator. Digging into the source files made me understand 
that it is hardcoded for qmake artifacts like deployed libraries in 
$buildDir/android-build/libs folder for understanding the abi of the 
output apk. Without them I get error 
https://github.com/qt-creator/qt-creator/blob/master/src/plugins/android/androidrunnerworker.cpp#L538 
<https://github.com/qt-creator/qt-creator/blob/master/src/plugins/android/androidrunnerworker.cpp#L538>about 
missing ndk debug server.

I have added fake files to make debugging work, but I ran into another 
problem of missing debug information and ignoring any kind of 
breakpoints. I have caught only SYGSEGV singnals so far, but without any 
stack. As we discussed on Discord, debug information getting stripped at 
least one time in 
https://github.com/qbs/qbs/blob/1.17/share/qbs/modules/cpp/android-gcc.qbs#L167 
<https://github.com/qbs/qbs/blob/1.17/share/qbs/modules/cpp/android-gcc.qbs#L167> 
and second here 
https://github.com/qbs/qbs/blob/1.17/share/qbs/module-providers/Qt/templates/android_support.qbs#L373 
<https://github.com/qbs/qbs/blob/1.17/share/qbs/module-providers/Qt/templates/android_support.qbs#L373>. 
I think this should depend on build variant.

All in all we have some problems in Qt Creator and in Qbs. Need to 
notice that qmake projects debugging works well, consequently there is a 
difference in output artifacts and stripped symbols. How do you guys 
debug your Android Qbs Projects?

Kind regards,
Max Bespalov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20201117/3d09a025/attachment.html>


More information about the Qbs mailing list