set_breakpoint_via_hook
Set a pseudo-breakpoint on JavaScript functions to capture arguments, call stack, context, and return values for debugging and reverse engineering purposes.
Instructions
Set a pseudo-breakpoint on a function via JS hooking.
When the target function is called, captures its arguments, call stack, this context, timestamp, and return value. Data is stored in window.__mcp_breakpoints and can be retrieved with get_breakpoint_data.
Args: target_function: Full path to the function (e.g. "window.encrypt", "XMLHttpRequest.prototype.open"). script_url_pattern: Optional URL pattern to limit which scripts are affected. persistent: If True, the breakpoint survives page navigation.
Returns: dict with status and the target function name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_function | Yes | ||
| script_url_pattern | No | ||
| persistent | No |