Debug with pdb + Django + app-engine-patch ?

54 views
Skip to first unread message

boson

unread,
Jan 27, 2009, 6:03:54 PM1/27/09
to Google App Engine
I can't get pdb to work with Django + app-engine-patch.

When I do this in my code:
import pdb
pdb.set_trace()

I get a stack trace printed to the console with a "BdbQuit" exception,
but the (Pdb) prompt itself is written to the HTML output with the
HTML for the Debug error page immediately following.

No interactive prompt ever comes up.

Am I missing a step?

Jesaja Everling

unread,
Jan 29, 2009, 8:02:42 AM1/29/09
to google-a...@googlegroups.com
Hi,

I also tried to get debugging to work.
In the comments for this article:

http://jjinux.blogspot.com/2008/05/python-debugging-google-app-engine-apps.html

Somebody describes how to define a method with which you can invoke
the debugger in a way that should work with the dev_appserver.
The same method is used in this discussion:

http://groups.google.com/group/google-appengine/browse_thread/thread/9f226a46a0de3188

I didn't really test it, but it seemed to work when I tried. (even
without commenting out "sys.meta_path = [hook]" like described in the
discussion).
You may also want to take a look at firepython in conjunction with the
Python logging module, it can also be of great help when you want to
verify how your code behaves in action.

Best Regards,

Jesaja Everling

boson

unread,
Jan 29, 2009, 12:47:00 PM1/29/09
to Google App Engine
Thanks for the links. Sorry my question wasn't phrased properly, as I
thought pdb already did work with the dev_appserver by itself.

Star this issue if you want pdb support in dev_appserver:
http://code.google.com/p/googleappengine/issues/detail?id=308

On Jan 29, 5:02 am, Jesaja Everling <jeverl...@gmail.com> wrote:
> Hi,
>
> I also tried to get debugging to work.
> In the comments for this article:
>
> http://jjinux.blogspot.com/2008/05/python-debugging-google-app-engine...
>
> Somebody describes how to define a method with which you can invoke
> the debugger in a way that should work with the dev_appserver.
> The same method is used in this discussion:
>
> http://groups.google.com/group/google-appengine/browse_thread/thread/...
>
> I didn't really test it, but it seemed to work when I tried. (even
> without commenting out "sys.meta_path = [hook]" like described in the
> discussion).
> You may also want to take a look at firepython in conjunction with the
> Python logging module, it can also be of great help when you want to
> verify how your code behaves in action.
>
> Best Regards,
>
> Jesaja Everling
>
Reply all
Reply to author
Forward
0 new messages