set_breakpoint_on_text
Sets a breakpoint on specified JavaScript source text to pause execution and inspect runtime values. Supports URL filtering and condition-based stopping.
Instructions
Sets a restorable URL-backed breakpoint when distinctive code text is known and its runtime values must be observed. Call it directly when the user already supplies precise text plus any URL/occurrence disambiguation; use search_in_sources/get_script_source first only when the location is unknown or ambiguous. For an API with no known code location, start with list_network_requests and get_request_initiator or use break_on_xhr. On a hit, call get_paused_info, optionally evaluate_script, then step or resume. Returns the current breakpointId for remove_breakpoint; list breakpoints again after a rebuilt debugger session, and note that unnamed inline/eval scripts cannot use this URL breakpoint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Exact case-sensitive source text used to locate the breakpoint, such as a distinctive function declaration, call, or statement. Prefer a snippet confirmed by search_in_sources and avoid common tokens. | |
| condition | No | Optional simple synchronous expression evaluated in the future call frame; the breakpoint pauses only when it is true. Use it to reduce repeated hits after the location is precise, never for async work, complex discovery, or side effects. | |
| urlFilter | No | Case-insensitive URL substring that limits candidate scripts. Use the URL from search_in_sources/get_script_source to avoid the same text in unrelated bundles. | |
| occurrence | No | One-based occurrence among matching loaded-source results (default: 1). Use only after reviewing multiple search matches; urlFilter is usually the more stable disambiguator. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool completed successfully. | |
| data | No | Machine-readable result payload. | |
| tool | Yes | Stable MCP tool name. | |
| error | No | ||
| summary | Yes | Concise human-readable outcome. |