python - Activating set_trace() selectively at runtime in pdb or sisters -
in pdb/ipdb/pudb, there trick whereby can selectively activate set_trace() statements during runtime?
i'm debugging complex code probabilistic behavior, , interact program without debugger distracting, , when situation of interest arises, activate set_trace/s. (this combined logging, not relevant question).
i think might possible conditionals, there better way?
i think there no such way, pudb (and other debuggers) can set_trace() unconditially.
i'm not sure trying accomplish moving condition set_trace() itself.. if have repetitive code there, wrap in function.
Comments
Post a Comment