If you ever tried to use pdb in application written using app-engine-patch, you should notice, that pdb is not working here at all. All pdb output is shown directly in browser. Thanks to Antonin Hildebrand from this thread now we have a way to use pdb for debugging GAE applications. Use following code to put trace in your app:
def b():For me it worked without any dev_appserver.py patches. Try it out!
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)
#...
#...
##########################
b()#here I want to start tracing
0 comments:
Post a Comment