print debug info to the console.

677 views
Skip to first unread message

detz

unread,
Apr 8, 2008, 10:36:27 PM4/8/08
to Google App Engine
How can I dump simple text to the console window for simple debugging?

Sridhar Ratnakumar

unread,
Apr 8, 2008, 10:48:09 PM4/8/08
to Google App Engine


On Apr 8, 7:36 pm, detz <ryandet...@gmail.com> wrote:
> How can I dump simple text to the console window for simple debugging?

There are two ways:

1. quick and dirty:
import sys
print >>sys.stderr, "blah blah blah"

2. recommended:
http://docs.python.org/lib/module-logging.html

Cheers,
Sridhar

jchris

unread,
Apr 8, 2008, 10:53:24 PM4/8/08
to Google App Engine
if you are logging, you need to call logging.info (or else set the log
level of your dev server to debug with the --debug flag)

ma...@google.com

unread,
Apr 9, 2008, 2:26:40 PM4/9/08
to Google App Engine
The webapp framework also supports a debug=True statement that will
display your stack trace in the browser.

Please see the following page of our documentation for how to
implement this:

http://code.google.com/appengine/docs/webapp/running.html

-Marzia
Reply all
Reply to author
Forward
0 new messages