Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

Re: set pdb break condition based upon number of hits?

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


deets at nospam

Nov 4, 2009, 5:41 PM

Post #1 of 1 (43 views)
Permalink
Re: set pdb break condition based upon number of hits?

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

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.