Debugging tools
Debugging tools
What Cloak Proxy's debugging tools do, how to open the Tools window, turn each tool on or off, and see which tools are active and which requests they changed.
Debugging tools change traffic while it passes through Cloak Proxy. You can pause a request and edit it, answer it from a local file, send it to another server, rewrite it with JavaScript, slow it down, block it, or replay recorded responses offline. Use them to test how your app handles errors, edge cases and bad networks without changing the app or the server.
The tools
Section titled “The tools”Cloak Proxy has eleven tools. Each one has its own rules and its own on/off switch.
| Tool | What it does | Default |
|---|---|---|
| Breakpoint | Pauses matching requests or responses so you can edit them before they continue. | On |
| Map Local | Answers matching requests with a local file, folder, or a response you write. The server is never contacted. | On |
| Map Remote | Sends matching requests to a different scheme, host, port, path or query, such as staging instead of production. | On |
| Scripting | Changes requests and responses with JavaScript: onRequest and onResponse. |
On |
| Block List | Blocks matching requests with a 403 or by dropping the connection. | On |
| Allow List | Only records matching requests. Everything else still works but isn’t shown. | Off |
| Network Conditions | Slows matching requests down to test 3G, high latency or packet loss. | Off |
| DNS Spoofing | Connects a host name to a different IP address while keeping the URL and Host header. | On |
| No Caching | Strips caching headers so every request reaches the server with fresh data. | Off |
| Mock Sets | Replays recorded responses without the network, so you can demo, test or debug an app offline. | On |
| Alerts | Posts a macOS notification when matching traffic fails, slows down or returns something specific. | On |
A tool only does something when it’s on and has at least one enabled rule. No Caching has no rules: turning it on applies it to every request.
Open the Tools window
Section titled “Open the Tools window”All rules live in the Debugging Tools window.
-
Choose Tools › Debugging Tools… or press ⌥ ⌘ 0.
You can also click Tools (the wrench) in the main window’s toolbar and choose Debugging Tools….
-
Pick a tool in the sidebar on the left.
-
Add a rule with the + button at the bottom of the rule list, or with Add Rule when the list is empty.
-
Fill in the rule on the right. Changes apply right away; there’s no Save button.
Six tools also have their own shortcut in the Tools menu, which opens the window on that tool:
| Menu item | Shortcut |
|---|---|
| Edit Breakpoint Rules… | ⌥ ⌘ B |
| Edit Map Local Rules… | ⌥ ⌘ L |
| Edit Map Remote Rules… | ⌥ ⌘ M |
| Edit Scripting Rules… | ⌥ ⌘ S |
| Edit Block List Rules… | ⌥ ⌘ K |
| Edit Network Conditions Rules… | ⌥ ⌘ T |
The other tools have Edit … Rules… items in the same menu without a shortcut.
The Debugging Tools window: tools on the left, rules in the middle, the selected rule's editor on the right.
- Every tool. The icon is colored while the tool is on.
- How many rules the tool has.
- Green dot: the tool is on. Gray: off.
- The tool's On/Off switch.
- A rule. The checkbox turns just this rule on or off.
- Add, delete and duplicate rules. Rules run top to bottom; drag to reorder.
Window layout
Section titled “Window layout”| Area | What it shows |
|---|---|
| Sidebar (Debugging Tools) | Every tool with its icon, the number of rules it has, and a green (on) or gray (off) dot. |
| Header | The tool’s name, a one-line summary of what it does, and the On/Off switch. |
| Rule list | Each rule’s checkbox, name (or Untitled) and, under it, the method and URL it matches (or No URL yet). Right-click a rule for Duplicate and Delete. |
| Rule list buttons | + adds a rule, − deletes the selected rule, and the third button duplicates it. The note Rules run top to bottom; drag to reorder is a reminder that order matters. |
| Editor | The selected rule’s settings. Every rule starts with a Rule section: a name and a matcher. |
DNS Spoofing uses a table instead of a rule list, No Caching has only its switch, and Mock Sets lists recorded sets instead of rules. Their pages explain the differences.
Turn tools on and off
Section titled “Turn tools on and off”Each tool has one switch that turns all its rules on or off at once. Its rules stay saved while it’s off. You can flip the switch in several places:
- The On/Off switch in the tool’s header in the Tools window.
- Tools menu: a checkmark item for every tool.
- The Tools toolbar button in the main window: the same list of toggles.
- Search Everything (⇧ ⌘ A): type the tool’s name and choose Turn On … or Turn Off ….
To pause a single rule, clear its checkbox in the rule list. A disabled rule is dimmed.
Rules and switches are saved and come back the next time you open Cloak Proxy.
See which tools are active
Section titled “See which tools are active”The status bar at the bottom of the main window shows a small chip for every tool that is on and has at least one enabled rule (and No Caching while it’s on). Click a chip to open that tool’s rules. When the window is narrow, the chips scroll sideways.
While a request or response is paused at a breakpoint, the status bar also shows an orange N paused at breakpoint button that opens the Breakpoint window.
See which tools changed a request
Section titled “See which tools changed a request”When a tool touches a request, the traffic list shows a colored badge before its path, with the tools separated by dots, for example Script · Map Remote. The labels are:
| Badge | Added when |
|---|---|
Block List |
A Block List rule answered or dropped the request. |
Network Conditions |
A Network Conditions rule slowed or dropped it. |
Script |
At least one script ran on the request or response. |
Breakpoint |
The request or response paused at a breakpoint. |
Map Local |
Map Local answered the request. |
Mock |
A mock set answered it (with a recording or an offline 404). |
Map Remote |
Map Remote rewrote the URL. |
No Caching |
No Caching changed its headers. |
DNS Spoofing |
The host was connected to a spoofed address. |
The traffic list records the request as it was finally sent, after every change.
Create rules from captured traffic
Section titled “Create rules from captured traffic”The quickest way to make a rule is from a request you already captured. Right-click a request in the traffic list and choose Tools, then a tool. Cloak Proxy creates a rule that matches that request, turns the tool on in most cases, and opens it in the Tools window. Rules and matching lists what each tool’s rule is prefilled with.
Share rules and use them elsewhere
Section titled “Share rules and use them elsewhere”- Tools › Export Rules… saves your rules to a JSON file, and Tools › Import Rules… adds rules from one. See Export and import rules.
cloakctl run --tools RULES.jsonloads an exported file for headless and CI runs.- The MCP server lets an AI assistant read and change rules with tools such as
list_rules,upsert_rule,delete_rule,set_tool_enabledandrule_from_request, and resolve breakpoints withlist_pausedandresolve_paused. See the MCP tools reference.
How tools work together
Section titled “How tools work together”When several tools match one request, they run in a fixed order: Block List first, then scripts and breakpoints, then Map Local, Mock Sets and Map Remote, then the server, then response scripts and breakpoints. The full order, and what each step can skip, is in Rule order and multiple tools.