[PyQt] Debugging pyqtdeploy android using Qt Creator

Phil Thompson phil at riverbankcomputing.com
Fri Sep 12 23:04:17 BST 2014

On 12/09/2014 10:57 pm, bootch at nc.rr.com wrote:
> 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.)

Don't assume anything about the developer notes - they are just notes to 
myself. You should read the Android docs.

> 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