[PyQt] Debugging pyqtdeploy android using Qt Creator

bootch at nc.rr.com bootch at nc.rr.com
Fri Sep 12 22:57:50 BST 2014

I was wrong that there is no code to print an exception trace: pyqtdeploy_start calls PyError_Print.  But I can't seem to get stderr to go to logcat.

FYI, you can't redirect stderr to android logcat on a non-rooted real device using 'adb shell setprop log.redirect-stdio true'.  It quietly fails.  But now I am trying to redirect stderr on an emulator, and I have yet to see a python traceback in logcat.  I haven't yet tried 'adb root' before redirecting, but I assume thats not necessary on an emulator (and not documented in the pyqtdeploy developer notes.)

I've determined that python gets as far as exec'ing (eval?) frozen __main__ before it crashes.

My app hooks into the python exception hook, so it displays my app's exceptions to the user.  But until the app gets going, any exceptions on a real device (where stderr is not redirected) will be silent: with nothing in logcat except 'the app died'.  I suppose that will be extremely rare.  But its bloody annoying that stderr is non standard on OSX and android.

More information about the PyQt mailing list