# eric6.DebugClients.Python.BreakpointWatch

Module implementing the breakpoint and watch class.

### Global Attributes

None

### Classes

Breakpoint | Breakpoint class.
Watch | Watch class.

### Functions

None

## Breakpoint

Breakpoint class.

Implements temporary breakpoints, ignore counts, disabling and (re)-enabling, and conditionals.

Breakpoints are indexed by the file,line tuple using breaks. It points to a single Breakpoint instance. This is rather different to the original bdb, since there may be more than one breakpoint per line.

To test for a specific line in a file there is another dict breakInFile, which is indexed only by filename and holds all line numbers where breakpoints are.

### Derived from

None

### Class Attributes

breakInFile
breakInFrameCache
breaks

### Class Methods

None

### Methods

Breakpoint | Constructor
deleteMe | Public method to clear this breakpoint.
disable | Public method to disable this breakpoint.
enable | Public method to enable this breakpoint.

### Static Methods

clear_all_breaks | Public method to clear all breakpoints.
clear_break | Public method reimplemented from bdb.py to clear a breakpoint.
effectiveBreak | Public method to determine which breakpoint for this filename:lineno is to be acted upon.
get_break | Public method to get the breakpoint of a particular line.

#### Breakpoint (Constructor)

Breakpoint(filename, lineno, temporary=False, cond=None)

Constructor

filename (str)
  file name where a breakpoint is set
lineno (int)
  line number of the breakpoint
temporary= (bool)
  flag to indicate a temporary breakpoint
cond= (str)
  Python expression which dynamically enables this bp

#### Breakpoint.deleteMe

deleteMe()

Public method to clear this breakpoint.

#### Breakpoint.disable

disable()

Public method to disable this breakpoint.

#### Breakpoint.enable

enable()

Public method to enable this breakpoint.

#### Breakpoint.clear_all_breaks (static)

clear_all_breaks()

Public method to clear all breakpoints.

#### Breakpoint.clear_break (static)

clear_break(lineno)

Public method reimplemented from bdb.py to clear a breakpoint.

filename (str)
  file name of the bp to retrieve
lineno (int)
  line number of the bp to retrieve

#### Breakpoint.effectiveBreak (static)

effectiveBreak(lineno, frame)

Public method to determine which breakpoint for this filename:lineno is to be acted upon.

Called only if we know there is a bpt at this location. Returns breakpoint that was triggered and a flag that indicates if it is ok to delete a temporary bp.

filename (str)
  file name of the bp to retrieve
lineno (int)
  line number of the bp to retrieve
frame (frame object)
  the current execution frame

Returns:
  tuple of Breakpoint and a flag to indicate, that a temporary breakpoint may be deleted

Return Type:
  tuple of Breakpoint, bool

#### Breakpoint.get_break (static)

get_break(lineno)

Public method to get the breakpoint of a particular line.

Because eric6 supports only one breakpoint per line, this method will return only one breakpoint.

filename (str)
  file name of the bp to retrieve
lineno (int)
  line number of the bp to retrieve

Returns:
  Breakpoint or None, if there is no bp

Return Type:
  Breakpoint object or None

Up

## Watch

Watch class.

Implements temporary watches, ignore counts, disabling and (re)-enabling, and conditionals.

### Derived from

None

### Class Attributes

watches

### Class Methods

None

### Methods

Watch | Constructor
deleteMe | Public method to clear this watch expression.
disable | Public method to disable this watch.
enable | Public method to enable this watch.

### Static Methods

clear_all_watches | Public method to clear all watch expressions.
clear_watch | Public method to clear a watch expression.
effectiveWatch | Public method to determine, if a watch expression is effective.
get_watch | Public method to get a watch expression.

#### Watch (Constructor)

Watch(cond, compiledCond, flag, temporary=False)

Constructor

cond (str)
  condition as string with flag
compiledCond (code object)
  precompiled condition
flag (str)
  indicates type of watch (created or changed)
temporary= (bool)
  flag for temporary watches

#### Watch.deleteMe

deleteMe()

Public method to clear this watch expression.

#### Watch.disable

disable()

Public method to disable this watch.

#### Watch.enable

enable()

Public method to enable this watch.

#### Watch.clear_all_watches (static)

clear_all_watches()

Public method to clear all watch expressions.

#### Watch.clear_watch (static)

clear_watch()

Public method to clear a watch expression.

cond (str)
  expression of the watch expression to be cleared

#### Watch.effectiveWatch (static)

effectiveWatch()

Public method to determine, if a watch expression is effective.

frame (frame object)
  the current execution frame

Returns:
  tuple of watch expression and a flag to indicate, that a temporary watch expression may be deleted

Return Type:
  tuple of Watch, int

#### Watch.get_watch (static)

get_watch()

Public method to get a watch expression.

cond (str)
  expression of the watch expression to be cleared

Returns:
  reference to the watch point

Return Type:
  Watch or None

Up