In pdb/ipdb/pudb, is there a trick whereby I can selectively activate set_trace() statements during runtime?
I'm debugging somewhat complex code with probabilistic behavior, and I would like to interact with the program without the debugger distracting, and when a situation of interest arises, activate the set_trace/s. (This is combined with logging, but not relevant to the question).
I think might be possible to do this with conditionals, but is there a better way?