[PyQt] Debugging pyqtdeploy android using Qt Creator

bootch at nc.rr.com bootch at nc.rr.com
Fri Sep 12 13:50:20 BST 2014

I am trying to use Qt Creator and its debugger to step into a pyqtdeployed-to-Android app.  Whenever I click the Debug icon, I get the warning "This does not seems to be a debug build" and then the app starts and crashes without any opportunity to set breakpoints or to step into the app.

The .pro file generated by pyqtdeploy has 'CONFIG += warn_on release'.  I changed 'release' to 'debug', with no apparent effect.  My understanding is that should cause qmake to generate a Makefile with '-g' CFLAGS so that debugging symbols are generated by the compiler (and so forth, generate other files needed by the debugger?)

I suppose Qt Creator GUI must be negating my change to the .pro, that other developers forego using QtCreator and use the command line.  But I don't know the command to start the proper gdb to debug an apk.

The app is a simple helloworld, and stops in pyqtdeploy_start.cpp at the call to PyImport_ImportFrozenModule() having argument '__main__', which returns -1 meaning initialization failed.  It seems like at that point, the python code (in import.c) has 'set an exception' but there is no code to print it to stderr (which I think I have redirected to logcat.)

More information about the PyQt mailing list