Name
break, b
Synopsis
break [location[ ,condition] ]
break without arguments lists currently defined
breakpoints and the number of times each breakpoint has triggered.
With an argument, break sets a breakpoint at the
given location.
location can be a line number or a
function name, optionally preceded by
filename: to set a
breakpoint in a file that is not the current one or at the start of a
function whose name is ambiguous (i.e., a function that exists in
more than one file). When condition is
present, condition is an expression to
evaluate (in the debugged context) each time the given line or
function is about to execute; execution breaks only when the
expression returns a true value. When setting a new breakpoint,
break returns a breakpoint number, which you can
then use to refer to the new breakpoint in any other
breakpoint-related pdb command.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access