views:

432

answers:

2

I have pydev on eclipse and would like to debug handlers. I put breakpoint on a handler and start project in debug mode. When I click on the hyperlink corresponding to handler the control does not come back to breakpoint. Am I missing something here? Also the launch is for google app engine application in python.

A: 

The simplest way to debug is to use the builtin python module pdb and debug from the shell.

Just set the trace in the handler you want to debug.

import pdb
pdb.set_trace()

How do U run the server, from within the eclipse or from the shell. If it is from the shell, then how does eclipse know you are even running the application;

You could use an user friendly version of pdb, ipdb that also includes user friendly options like auto complete.

Lakshman Prasad
thx but i was shifting to eclipse so queried
dhaval
+3  A: 

I'm using eclipse with PyDev with appengine and I debug all the time, it's completely possible !

What you have to do is start the program in debug, but you have to start the dev_appserver in debug, not the handler directly. The main module you have to debug is:

<path_to_gae>/dev_appserver.py

With program arguments:

--datastore_path=/tmp/myapp_datastore <your_app>

I hope it help

Steve Gury
tht helps, i was wondering the path of storage on windows XP, not found yet
dhaval