setting a breakpoint in the module

Simon Forman rogue_pedro at yahoo.com
Wed Aug 23 17:27:50 EDT 2006


Jason Jiang wrote:
> "Simon Forman" <rogue_pedro at yahoo.com> wrote in message
> news:1156366612.827337.256610 at 74g2000cwt.googlegroups.com...
> > Jason Jiang wrote:
> >> Hi,
> >>
> >> I have two modules: a.py and b.py. In a.py, I have a function called
> >> aFunc(). I'm calling aFunc() from b.py (of course I import module a
> >> first).
> >> The question is how to directly set a breakpoint in aFunc().
> >>
> >> The way I'm doing now is to set a breakpoint in b.py at the line to call
> >> aFunc(), 'c' to it, then 's' to step in, then set the breakpoint inside
> >> aFunc() by 'b lineNumber'. It's too cumbersome.
> >>
> >> Thanks.
> >> Jason
> >
> > What debugger are you using?
>
> I'm using Python pdb module pdb.py.
>

So, can't you just issue the command:

(Pdb) b a.py:aFunc

or

(Pdb) b a.py:lineNumber

where "lineNumber" is a line number in a.py within aFunc()?


http://docs.python.org/lib/debugger-commands.html

Peace,
~Simon




More information about the Python-list mailing list