Suppose I have the following python code:
import dummy
def run():
print('Running calc() function')
y = dummy.perform_very_long_calculation()
out = calc(y) #BP1 is here
print(out)
def calc(x):
print('Calculating ...')
return x+2 #BP2 is here
run()
The goal is to have this flow:
- Put a debug break-point ("BP1") on "out = calc(y)" line.
- Put a debug break-point ("BP2") on "return x+2" line.
- Run the module and stop on this "BP1".
- Call calc(y) from the interactive debug console.
- Stop on "BP2".
- debug calc()
- goto #4 and repeat, until I am pleased with calc()
The problem: item 5 is not working. The code is not suspended on "BP2".
My motivation: I want to call calc function until it is good. This way I can dubug calc again and again without calling it through run which take 20 seconds. I am very used to this kind of debugging flow from Matlab IDE and it is very convenience.
How can I make "BP2" stop?