Re: set pdb break condition based upon number of hits?
by Diez B. Roggisch other posts by this author
Nov 4 2009 5:46PM messages near this date
Re: multicast
|
module imports and st_mtime
Reckoner schrieb:
> Is it possible to set pdb break condition based upon number of hits? I
> mean something like
>
> (Pdb) break line_number (number_of_hits_for_this_breakpoint >10)
>
> any help appreciated.
MY_GLOBAL_COUNTER = 0
MY_GLOBAL_COUNTER += 1
if MY_GLOBAL_COUNTER > = 10:
import pdb; pdb.set_trace()
Diez
--
http://mail.python.org/mailman/listinfo/python-list
|