I have pdb.set_trace() in two spots of my code. The problem is that I get multiple stops in the second area when I want it to start somewhere specific. Here is an example:
def function():
#some code in here
pdb.set_trace()
#some more code
def main():
#some code
function()
#come more code
function()
#the code I care about
pdb.set_trace()
function()
The problem here is that it will stop in function twice before actually getting to the actual set_trace I want to which first stops inside main and then to function.
This isn't a big deal but in a real setting I get 100s of calls to inside of 'function' before getting to the 'main' set_trace(). Is there a way to specify the first set_trace() or ignore all calls to set_trace until I get to the one I want?