Reputation: 3464
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!
Upvotes: 5
Views: 1427
Reputation: 12895
You can always stick to good old Python built-in pdb symbolic debugger. It works if dev_appserver.py
is run from command line.
https://cloud.google.com/appengine/docs/python/tools/devserver#Python_Debugging_with_PDB
Upvotes: 0
Reputation: 9116
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.
Upvotes: 5