Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Tom P Newsgroups: comp.lang.python Subject: Python PDB conditional breakpoint Date: Wed, 06 Nov 2013 16:14:04 +0100 Lines: 43 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net PYsakqcYmMMQBYjHkPE6fQRUjTlyhM+gzb947VvfHP5JK7Pao= Cancel-Lock: sha1:AcghYauAnK9oUqbouts8/n5iCmo= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 Xref: csiph.com comp.lang.python:58566 I can't get conditional breakpoints to work. I have a variable ID and I want to set a breakpoint which runs until ID==11005. Here's what happens - -> import sys ... (Pdb) b 53, ID==11005 Breakpoint 1 at /home/tom/Desktop/BEST Tmax/MYSTUFF/sqlanalyze3.py:53 (Pdb) b Num Type Disp Enb Where 1 breakpoint keep yes at /home/tom/Desktop/BEST Tmax/MYSTUFF/sqlanalyze3.py:53 stop only if ID==11005 (Pdb) l 50 for ID in distinct_IDs: 51 cursr.execute("select Date, Temperature from data where StationID = ? and Date > 1963", ID) 52 datarecords = cursr.fetchall() # [(date, temp),..] 53 B-> ll = len(datarecords) 54 if ll > 150: # and len(results) < 100 : (Pdb) c ... std_error too large -132.433 61.967 10912 std_error too large -133.36274 62.2165 10925 std_error too large -137.37 62.82 10946 std_error too large -138.217 64.45 10990 std_error too large -138.32 65.35 11005 std_error too large -138.32 65.35 11005 std_error too large -138.32 65.35 11005 std_error too large -138.32 65.35 11005 std_error too large -134.86625 67.415 11036 std_error too large -135.0 68.22908 11053 ... - in other words it doesn't stop even though the value ID == 11005 shows up. Am I specifying the condition incorrectly? This is Python 2.7.4, Linux 64 bit.