I have been struggling to find ways to debug some python scripts and gql datastore queries in GAE using textmate.
For the gql queries, can we print the queries to see what's in the database? (like php print_r function).
For the .py files, anyway we can log it? I tried using logging module. logging.info
or logging.debug
doesn't seem to return anything in the browser or the GAE console.log
. Where does it suppose to return the output?
Any help will be appreciated!
You can use the Console which will allow you to run Python commands directly in production. Here is a question relating to that. The interactive console may help debug those queries a bit faster.
logging.debug does work, but it logs to the log system on your app engine admin panel. Go to appengine.google.com, select your application then click on "logs". Then select "Logs with minimum severity: Debug" and you'll see your logging info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With