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

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -