Hi Antonin,
when I am commenting the line suggested in the dev_appserver.py, I get
the following error message:

  File "/home/mat/prog/google_appengine/google/appengine/tools/
dev_appserver.py", line 782, in __init__
    raise IOError(errno.EACCES, 'file not accessible')
IOError: [Errno 13] file not accessible

In the gae sdk version 1.1.8, the line 782 refers to the init function
of a fake file. Should I bypass completely the test for a fake file?
If so, I get version conflicts with other libs.
This is getting really annoying, I really don't understand why pdb is
not available for the DEV side!

Thanks,
Mat

On Jan 24, 8:40 am, Antonin Hildebrand <antonin.hildebr...@gmail.com>
wrote:
> Hi Mat,
>
> I'm using pdb with success.
>
> 1. in SDK comment out line: "sys.meta_path = [hook]" in
> dev_appserver.py (Warning: this will disable hardened production-like
> environment dev_appserver provides for your local app!)
> 2. use following code to put trace in your app:
> def b():
>   import pdb, sys
>   sys.__stdout__.write('\a')
>   sys.__stdout__.flush()
>   debugger = pdb.Pdb(stdin=sys.__stdin__, stdout=sys.__stdout__)
>   debugger.set_trace(sys._getframe().f_back)
>
> I have this function dbg module and small textmate snippet which puts:
> import dbg;dbg.b() # where you want breakpoint
>
> regards,
> Antonin
>
> Note: once I was able to use pdb without global sys.meta patch by
> temporarily patching sys.meta in my main handler. This doesn't work
> for me anymore (maybe some caching issues or some newly hardened parts
> got into the way, I don't know I'm not a python pro)
>
> You may also check FirePython for aid in debugging your 
> app:http://github.com/darwin/firepython/tree/master
>
> On Jan 24, 7:48 am, Mat <matdrap...@gmail.com> wrote:
>
> > Hi,
> > I really would like to use pdb as my main way to debug an old app that
> > I received from a third-party.
> > Does it have a way to enable it by modifying the dev server code?
>
> > Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to