google-cloud-debugger - Class Google::Cloud::Debugger::BreakpointManager (v0.42.2)
Reference documentation and code samples for the google-cloud-debugger class Google::Cloud::Debugger::BreakpointManager.
BreakpointManager
Responsible for querying Stackdriver Debugger service for any active
breakpoints and keep an accurate local copies of the breakpoints.
It correctly remembers which breakpoints are currently active and
watched by the debugger agent, and which breakpoints are already
completed. The BreakpointManager holds the record of truth for debugger
breakpoints
call_stack_bindings (Array<Binding>) — An array of Ruby Binding
objects, from the each frame of the call stack that leads to the
triggering of the breakpoints.
(Google::Cloud::Debugger::Breakpoint, NilClass) — The same
breakpoint if successfully marked off as completed. Nil if
this breakpoint isn't found in the list of active breakpoints or
failed to mark off as completed.
#on_breakpoints_change
defon_breakpoints_change()->Method
Callback function invoked when new breakpoints are added or removed
Returns
(Method)
#on_breakpoints_change=
defon_breakpoints_change=(value)->Method
Callback function invoked when new breakpoints are added or removed
Parameter
value (Method)
Returns
(Method)
#sync_active_breakpoints
defsync_active_breakpoints(debuggee_id)->Boolean
Sync active breakpoints with Stackdriver Debugger service for a given
debuggee application. Each request to the debugger service returns
the full list of all active breakpoints. This method makes sure the
local cache of active breakpoints is consistent with server
breakpoints set.
Parameter
debuggee_id (String) — Debuggee application ID
Returns
(Boolean) — True if synced successfully; otherwise false.
#update_breakpoints
defupdate_breakpoints(server_breakpoints)
Update the local breakpoints cache with a list of server active
breakpoints. New breakpoints will be added to local cache, and deleted
breakpoints will be removed from local cache.
It also correctly identifies evaluated active breakpoints from the
server set of breakpoints, and does not re-add such evaluated
breakpoints to the active list again.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# google-cloud-debugger - Class Google::Cloud::Debugger::BreakpointManager (v0.42.2)\n\nReference documentation and code samples for the google-cloud-debugger class Google::Cloud::Debugger::BreakpointManager.\n\nBreakpointManager\n-----------------\n\nResponsible for querying Stackdriver Debugger service for any active\nbreakpoints and keep an accurate local copies of the breakpoints.\n\nIt correctly remembers which breakpoints are currently active and\nwatched by the debugger agent, and which breakpoints are already\ncompleted. The BreakpointManager holds the record of truth for debugger\nbreakpoints \n\nInherits\n--------\n\n- Object \n\nIncludes\n--------\n\n- MonitorMixin\n\nMethods\n-------\n\n### #active_breakpoints\n\n def active_breakpoints() -\u003e Array\u003cGoogle::Cloud::Debugger::Breakpoint\u003e\n\nGet a list of all active breakpoints. \n**Returns**\n\n- (Array\\\u003c[Google::Cloud::Debugger::Breakpoint](./Google-Cloud-Debugger-Breakpoint)\\\u003e) --- A list of all active breakpoints.\n\n### #agent\n\n def agent() -\u003e Google::Cloud::Debugger::Agent\n\nThe debugger agent this tracer belongs to \n**Returns**\n\n- ([Google::Cloud::Debugger::Agent](./Google-Cloud-Debugger-Agent))\n\n### #all_complete?\n\n def all_complete?() -\u003e Boolean\n\nCheck whether any active breakpoints haven't been completed yet. \n**Returns**\n\n- (Boolean) --- True if no more active breakpoints are left. False otherwise.\n\n### #app_root\n\n def app_root() -\u003e String\n\nApplication root directory, in absolute file path form. \n**Returns**\n\n- (String)\n\n### #breakpoint_hit\n\n def breakpoint_hit(breakpoint, call_stack_bindings)\n\nEvaluates a hit breakpoint, and submit the breakpoint to\nTransmitter if this breakpoint is evaluated successfully.\n\n\n\u003cbr /\u003e\n\nSee [Snappoint#evaluate](/ruby/docs/reference/google-cloud-debugger/latest/Google-Cloud-Debugger-Snappoint#Google__Cloud__Debugger__Snappoint_evaluate_instance_ \"Google::Cloud::Debugger::Snappoint#evaluate (method)\") and [Logpoint#evaluate](/ruby/docs/reference/google-cloud-debugger/latest/Google-Cloud-Debugger-Logpoint#Google__Cloud__Debugger__Logpoint_evaluate_instance_ \"Google::Cloud::Debugger::Logpoint#evaluate (method)\") for evaluation\ndetails. \n**Parameters**\n\n- **breakpoint** ([Google::Cloud::Debugger::Breakpoint](./Google-Cloud-Debugger-Breakpoint)) --- The breakpoint to be evaluated\n- **call_stack_bindings** (Array\\\u003cBinding\\\u003e) --- An array of Ruby Binding objects, from the each frame of the call stack that leads to the triggering of the breakpoints.\n\n### #breakpoints\n\n def breakpoints() -\u003e Array\u003cGoogle::Cloud::Debugger::Breakpoint\u003e\n\nGet a list of all breakpoints, both active and completed. \n**Returns**\n\n- (Array\\\u003c[Google::Cloud::Debugger::Breakpoint](./Google-Cloud-Debugger-Breakpoint)\\\u003e) --- A list of all breakpoints.\n\n### #clear_breakpoints\n\n def clear_breakpoints()\n\nClear local breakpoints cache. Remove all active and completed\nbreakpoints\n\n### #completed_breakpoints\n\n def completed_breakpoints() -\u003e Array\u003cGoogle::Cloud::Debugger::Breakpoint\u003e\n\nGet a list of all completed breakpoints. \n**Returns**\n\n- (Array\\\u003c[Google::Cloud::Debugger::Breakpoint](./Google-Cloud-Debugger-Breakpoint)\\\u003e) --- A list of all completed breakpoints.\n\n### #log_logpoint\n\n def log_logpoint(logpoint)\n\nAssume the given logpoint is successfully evaluated, log the\nevaluated log message via logger \n**Parameter**\n\n- **logpoint** ([Google::Cloud::Debugger::Breakpoint](./Google-Cloud-Debugger-Breakpoint)) --- The evaluated logpoint.\n\n### #mark_off\n\n def mark_off(breakpoint) -\u003e Google::Cloud::Debugger::Breakpoint, NilClass\n\nMark a given active breakpoint as completed. Meaning moving it from\nlist of active breakpoints to completed breakpoints. \n**Parameter**\n\n- **breakpoint** ([Google::Cloud::Debugger::Breakpoint](./Google-Cloud-Debugger-Breakpoint)) --- The breakpoint to remove from local cache \n**Returns**\n\n- ([Google::Cloud::Debugger::Breakpoint](./Google-Cloud-Debugger-Breakpoint), NilClass) --- The same breakpoint if successfully marked off as completed. Nil if this breakpoint isn't found in the list of active breakpoints or failed to mark off as completed.\n\n### #on_breakpoints_change\n\n def on_breakpoints_change() -\u003e Method\n\nCallback function invoked when new breakpoints are added or removed \n**Returns**\n\n- (Method)\n\n### #on_breakpoints_change=\n\n def on_breakpoints_change=(value) -\u003e Method\n\nCallback function invoked when new breakpoints are added or removed \n**Parameter**\n\n- **value** (Method) \n**Returns**\n\n- (Method)\n\n### #sync_active_breakpoints\n\n def sync_active_breakpoints(debuggee_id) -\u003e Boolean\n\nSync active breakpoints with Stackdriver Debugger service for a given\ndebuggee application. Each request to the debugger service returns\nthe full list of all active breakpoints. This method makes sure the\nlocal cache of active breakpoints is consistent with server\nbreakpoints set. \n**Parameter**\n\n- **debuggee_id** (String) --- Debuggee application ID \n**Returns**\n\n- (Boolean) --- True if synced successfully; otherwise false.\n\n### #update_breakpoints\n\n def update_breakpoints(server_breakpoints)\n\nUpdate the local breakpoints cache with a list of server active\nbreakpoints. New breakpoints will be added to local cache, and deleted\nbreakpoints will be removed from local cache.\n\n\n\u003cbr /\u003e\n\nIt also correctly identifies evaluated active breakpoints from the\nserver set of breakpoints, and does not re-add such evaluated\nbreakpoints to the active list again. \n**Parameter**\n\n- **server_breakpoints** (Array\\\u003c[Google::Cloud::Debugger::Breakpoint](./Google-Cloud-Debugger-Breakpoint)\\\u003e) --- List of active breakpoints from Stackdriver Debugger service"]]