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 6 1932
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.
"Simon Forman" <ro*********@yahoo.comwrote in message
news:11**********************@74g2000cwt.googlegro ups.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?
-- http://mail.python.org/mailman/listinfo/python-list
Jason Jiang wrote:
"Simon Forman" <ro*********@yahoo.comwrote in message
news:11**********************@74g2000cwt.googlegro ups.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
Great! It's working now. Thank you so much.
Jason
"Simon Forman" <ro*********@yahoo.comwrote in message
news:11*********************@m73g2000cwd.googlegro ups.com...
Jason Jiang wrote:
>"Simon Forman" <ro*********@yahoo.comwrote in message news:11**********************@74g2000cwt.googlegr oups.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
-- http://mail.python.org/mailman/listinfo/python-list
"Jason Jiang" <ji********@gmail.comwrites:
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.
--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
Jason Jiang wrote:
Great! It's working now. Thank you so much.
Jason
You're welcome, it's a pleasure! :-D
~Simon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: chris |
last post by:
hello
I have a project with two imported dll's. I try to put a breakpoint in the
main project in one of the modules of the DLL ... Some breakpoints are hit
but in one module no breakpoints are...
|
by: Hazz |
last post by:
What is the triggering action that raises the event which causes my
breakpoint to be reached, repeatedly, but does not allow my form to ever
remain visible. I set a breakpoint on the line...
|
by: Brett Baisley |
last post by:
At school, we do all of our coding in emacs, but I am trying to get the
example apps working at home using Visual C++.net.
In the example, there are 4 .cpp files (canvas.cpp, main.cpp,...
|
by: johndoe |
last post by:
While creating a shopping cart application I noticed a strange bug which resulted in the Constructor and everything being called twice. I was using Inherited classes ClassShowProducts inherited...
|
by: Rodger Dusatko |
last post by:
In VB .NET I am having problems setting breaks. I want the break to be
independant of any single function:
for example:
err.number
or global variables
When I try to set a break with the 'Data'...
|
by: Jason Jiang |
last post by:
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...
|
by: Jerry Spence1 |
last post by:
In VB6 you could set a breakpoint when a variable had changed value. I can't
find this in VB2005. Is it there somewhere?
-Jerry
|
by: geniet |
last post by:
Hello all of you,
I have some problem in setting cells values (or fromat or...) in my Excel spreadsheet using a VB statement like within my Module:
Range("C1").Value = 20
I have this in a...
|
by: ARC |
last post by:
This is strange... I set a break point on a form's code module, and then
after a bit, shut down the main program file. Now whenever I click the
button for the form, it opens the code module, with a...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |