Debugging

Fulvio fulvio at tm.net.my
Thu Oct 26 06:35:16 EDT 2006


***********************
Your mail has been scanned by InterScan MSS.
***********************


On Wednesday 25 October 2006 06:13, Bruno Desthuilliers wrote:
> The bp #1 should only trigger if y >= 6

This give me the right point.

> > Supposing to have a function on program's variables the statement like "
> > if myvar == True: break" doesn't gives power to the BP.
>
> I definitively don't understand you. How does statements in your program
> relates to setting conditions on a bp in the debugger ?

The online help states :
|(Pdb) h b
|b(reak) ([file:]lineno | function) [, condition]
|With a line number argument, set a break there in the current
|file.  With a function name, set a break at first executable line
|of that function.  Without argument, list all breaks.  If a second
|argument is present, it is a string specifying an expression
|which must evaluate to true before the breakpoint is honored.

"(Pdb)" is the prompt, as you can see.

I was thinking the "condition" is anything python can digest .Therefore an 'if 
condition: code' should be accepted. Editing a BP with a condition like that 
is taken as good (perhaps there's no check on its validity)

> Did you really bother reading the doc
http://www.python.it/doc/Python-Docs/html/lib/debugger-commands.html
I downloaded all directory tree :)
Doesn't make difference in what is wrote on those and what is given at command 
line help. If my ignorance disturbing too much, feel free to ignore it any 
time. (No flame intention, however) I appreciate your help and these replies 
will make easier for somebody else when a search engine will hit this post.

|(Pdb) b 17
|Breakpoint 3 at /home/user/tmp/mbxreader.py:17
|(Pdb) cl 3
|No breakpoint numbered 3
|(Pdb) h cl
|cl(ear) filename:lineno
|cl(ear) [bpnumber [bpnumber...]]
|With a space separated list of breakpoint numbers, clear
|those breakpoints.  Without argument, clear all breaks 

Do I input wrongly?
Finally I've done some test on pydb, I felt no much differences. But also the 
author tried to keep compatibility with Pdb/Bdb, except some more functions.

F





More information about the Python-list mailing list