setting a breakpoint in the module

J

Jason Jiang

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
 
S

Simon Forman

Jason said:
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?
 
D

David M. Cooke

Jason Jiang said:
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.

You can also add in your source

import pdb; pdb.set_trace()

at the point you want the debugger to stop. Useful if you want to
break after some failing condition, for instance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top