Skip to content

ProcessDebugBreakpoint

BreakPointType

Bases: Enum

PROCESS_DEBUG_CONTEXT_DATA_BREAK_POINT = 'ProcessDebugContextDataBreakpoint' class-attribute instance-attribute

PROCESS_DEBUG_CONTEXT_LINE_BREAK_POINT = 'ProcessDebugContextLineBreakpoint' class-attribute instance-attribute

PROCESS_DEBUG_CONTEXT_LOCK_BREAK_POINT = 'ProcessDebugContextLockBreakpoint' class-attribute instance-attribute

__str__()

Source code in TM1py/Objects/ProcessDebugBreakpoint.py
def __str__(self):
    return self.value

HitMode

Bases: Enum

BREAK_ALWAYS = 'BreakAlways' class-attribute instance-attribute

BREAK_EQUAL = 'BreakEqual' class-attribute instance-attribute

BREAK_GREATER_OR_EQUAL = 'BreakGreaterOrEqual' class-attribute instance-attribute

__str__()

Source code in TM1py/Objects/ProcessDebugBreakpoint.py
def __str__(self):
    return self.value

ProcessDebugBreakpoint(breakpoint_id, breakpoint_type=BreakPointType.PROCESS_DEBUG_CONTEXT_LINE_BREAK_POINT, enabled=True, hit_mode=HitMode.BREAK_ALWAYS, hit_count=0, expression='', variable_name='', process_name='', procedure='', line_number=0, object_name='', object_type='', lock_mode='')

Bases: TM1Object

Abstraction of a TM1 Process Debug Breakpoint.

Source code in TM1py/Objects/ProcessDebugBreakpoint.py
def __init__(
    self,
    breakpoint_id: int,
    breakpoint_type: Union[BreakPointType, str] = BreakPointType.PROCESS_DEBUG_CONTEXT_LINE_BREAK_POINT,
    enabled: bool = True,
    hit_mode: Union[HitMode, str] = HitMode.BREAK_ALWAYS,
    hit_count: int = 0,
    expression: str = "",
    variable_name: str = "",
    process_name: str = "",
    procedure: str = "",
    line_number: int = 0,
    object_name: str = "",
    object_type: str = "",
    lock_mode: str = "",
):
    self._type = BreakPointType(breakpoint_type)
    self._id = breakpoint_id
    self._enabled = enabled
    self._hit_mode = HitMode(hit_mode)
    self._hit_count = hit_count
    self._expression = expression
    self._variable_name = variable_name
    self._process_name = process_name
    self._procedure = procedure
    self._line_number = line_number
    self._object_name = object_name
    self._object_type = object_type
    self._lock_mode = lock_mode

body property

body_as_dict property

breakpoint_id property

breakpoint_type property

enabled property writable

expression property writable

hit_count property

hit_mode property writable

line_number property writable

lock_mode property writable

object_name property writable

object_type property writable

procedure property writable

process_name property writable

variable_name property writable

from_dict(breakpoint_as_dict) classmethod

Parameters:

Name Type Description Default
breakpoint_as_dict Dict
required

Returns:

Type Description
ProcessDebugBreakpoint

an instance of this class

Source code in TM1py/Objects/ProcessDebugBreakpoint.py
@classmethod
def from_dict(cls, breakpoint_as_dict: Dict) -> "ProcessDebugBreakpoint":
    """
    :param breakpoint_as_dict:
    :return: an instance of this class
    """
    breakpoint_type = breakpoint_as_dict["@odata.type"][16:]
    return cls(
        breakpoint_type=breakpoint_type,
        breakpoint_id=breakpoint_as_dict["ID"],
        enabled=breakpoint_as_dict["Enabled"],
        hit_mode=breakpoint_as_dict["HitMode"],
        hit_count=breakpoint_as_dict["HitCount"],
        expression=breakpoint_as_dict["Expression"],
        variable_name=(
            breakpoint_as_dict["VariableName"] if breakpoint_type == "ProcessDebugContextDataBreakpoint" else ""
        ),
        process_name=(
            breakpoint_as_dict["ProcessName"] if breakpoint_type == "ProcessDebugContextLineBreakpoint" else ""
        ),
        procedure=breakpoint_as_dict["Procedure"] if breakpoint_type == "ProcessDebugContextLineBreakpoint" else "",
        line_number=(
            breakpoint_as_dict["LineNumber"] if breakpoint_type == "ProcessDebugContextLineBreakpoint" else ""
        ),
        object_name=(
            breakpoint_as_dict["ObjectName"] if breakpoint_type == "ProcessDebugContextLockBreakpoint" else ""
        ),
        object_type=(
            breakpoint_as_dict["ObjectType"] if breakpoint_type == "ProcessDebugContextLockBreakpoint" else ""
        ),
        lock_mode=breakpoint_as_dict["LockMode"] if breakpoint_type == "ProcessDebugContextLockBreakpoint" else "",
    )