thanks Bill,
   its working now - i wasn't aware you had to change the runserver
command.  this is what I used:

python -m pdb manage.py runserver

thanks!

On Oct 30, 10:52 am, Bill Freeman <ke1g...@gmail.com> wrote:
> It works for me.
>
> Maybe you're not getting to those statements?  Another module of the same name
> on the path being imported instead?  When I stick it in a view
> function and it doesn't
> hit it's usually because I've botched urls.py.
>
> Try putting them at top level in the module, in which case it should
> stop during import.
> Follow it with a print statement so that if it doesn't stop you know
> whether the code
> got run.
>
> You are doing this from the command line, such as shell or runserver,
> right?  set_trace()
> isn't useful, so far as I know, in WSGI or mod_python modes.
>
> [What bothers me is that if I use
> pdb.run('some_module.some_function()') in manage
> shell, it doens't seem to be able to figure out what filesystem .py
> file goes with the module,
> so it can't print source lines and you're single stepping blind.
> Works fine from a set_trace()
> but sometimes I'd rather not edit the source code, especially on a
> shared server, and it's
> a pain to create a dummy module with a set_trace() and the call to the
> target function.]
>
> Bill
>
> On Fri, Oct 30, 2009 at 1:11 PM,skunkwerk<skunkw...@gmail.com> wrote:
>
> > Hi,
> >   i've been trying to use pdb inside my django code, but it never
> > breaks the program flow.  I insert this into my code:
>
> > import pdb
> > pdb.set_trace()
>
> > but it just continues execution - is there something i need to be
> > doing?
>
> > thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to