Debugging tools
Breakpoint
Pause matching requests or responses in Cloak Proxy, edit the method, URL, headers, body or status, then execute, cancel or abort them.
A breakpoint stops a request on its way to the server, or a response on its way back to the app, and waits for you. While it’s paused you can change anything: the method, URL, headers and body of a request, or the status code, headers and body of a response. Use it to try an edge case once, by hand, without writing a script or a mock.
Set a breakpoint
Section titled “Set a breakpoint”-
Right-click a request in the traffic list and choose Tools › Breakpoint….
Cloak Proxy creates a rule that matches the request’s method and URL (without the query string), turns Breakpoint on, and opens the rule. To start from scratch instead, choose Tools › Edit Breakpoint Rules… (⌥ ⌘ B) and click +.
-
Check the matcher. See Rules and matching for wildcards, regex and subpaths.
-
Under Pause on, choose what to stop:
- Request: edit the method, URL, headers or body before it’s sent
- Response: edit the status, headers or body before the app gets it
-
Make the request again in your app. Cloak Proxy plays a sound, brings itself to the front and opens the Breakpoint window.
A Breakpoint rule created from a request. Both the request and the response pause.
- The URL to pause on.
- Pause the request before it's sent.
- Pause the response before the app gets it.
- Turns every breakpoint rule on or off.
Rule settings
Section titled “Rule settings”| Setting | Default | What it does |
|---|---|---|
| Name and matcher | Which requests pause. See Rules and matching. | |
| Request: edit the method, URL, headers or body before it’s sent | On | Pauses the request after request scripts run and before Map Local, Mock Sets, Map Remote and the server. |
| Response: edit the status, headers or body before the app gets it | On | Pauses the response after response scripts run and before the app receives it. |
Only the first matching breakpoint rule counts. If that rule pauses only responses, the request isn’t paused even if a later rule would pause it.
Break on the next request only
Section titled “Break on the next request only”Break on Next Request pauses the next request like one you already captured, once, and then removes its rule. Use it to catch a single request, such as the next login or the next save, without leaving a breakpoint behind that stops every later request.
-
Right-click a request in the traffic list and choose Break on Next Request. You can also select it and choose Proxy › Break on Next Request.
Cloak Proxy adds a one-time rule and turns Breakpoint on. The Tools window doesn’t open.
-
Make the request again in your app. The Breakpoint window opens with the request paused.
-
Edit it and click Execute, or use Cancel or Abort, as with any paused request.
| Detail | One-time rule |
|---|---|
| Name | Next followed by the method, host and path, for example Next POST api.example.com/v1/login. |
| Matches | The request’s method and URL without its query string, with subpaths off. |
| Pauses | The request only. Its response isn’t paused. |
| Where it goes | At the bottom of the Breakpoint rule list, where you can see it until it’s used. |
| When it’s removed | As soon as a request matches it, while that request is still paused. |
| Requests at the same time | Only one request takes the breakpoint. If the app sends several matching requests at once, the others carry on without pausing. |
The item isn’t available for encrypted tunnels. Only the first matching breakpoint rule counts, so if an enabled rule above the one-time rule matches the same request, that rule decides and the one-time rule keeps waiting. A one-time rule that never matches stays in the list, even after a restart; delete it in the Tools window if you no longer need it.
From an AI assistant, the MCP server tool break_on_next does the same for a captured request’s id. Then use list_paused and resolve_paused, described below.
Edit a paused request
Section titled “Edit a paused request”A paused request. Edit anything, then click Execute.
- Paused messages, oldest first, with their stage, method, time, URL and rule.
- Abort: drop it and close the app's connection.
- Cancel: send the original, ignoring your edits.
- Execute: send it with your edits (⌘↩).
- Continue All: send every paused message on, unedited.
The editor shows Request paused with the request number and the rule name. Under Request you can change:
| Field | Notes |
|---|---|
| Method | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, CONNECT or TRACE. |
| URL | The full URL, including the query string. Change the host to send the request somewhere else. |
| Headers | Edit names and values in place, click Add for a new header, or click the minus button to remove one. |
| Body | The body editor, described below. |
The body editor
Section titled “The body editor”The body has its own editor, with Code, Tree and Hex at the top (Table instead of Tree for form bodies).
| Mode | What you can do |
|---|---|
| Code | Line numbers, syntax colors, folding, find (⌘ F) and replace (⌥ ⌘ F), undo, auto-indent and bracket pairing. |
| Tree | Edit a value in place, change its type, rename a key, add, duplicate, move or delete a key or item, filter keys and values, copy a key, value or path, and find things with JSONPath or jq. |
| Table | Edit form fields as rows. |
| Hex | Read binary bodies; Edit as Text switches to Code. |
Format (⇧ ⌘ F) and Minify only change whitespace; Sort keys reorders keys; Revert goes back to the original. The status reads Valid JSON or, for example, Invalid JSON at line 5, column 19: click it, or Go to Error in Tree, to jump there. Code and Tree edits share one undo history and keep the body’s layout, so a minified body stays minified. ⌘ ↩ sends from inside the editor, and Esc never throws your edits away. The same editor is used for Map Local, Mock Sets, Compose and the API client.
Compressed bodies (gzip, deflate, Brotli) are decompressed before you see them, and the Content-Encoding header is removed, so you always edit readable text.
Since 0.4.0 gRPC, gRPC-Web, Connect and Protobuf bodies open as JSON and are encoded again on Execute. See Edit Protobuf and gRPC. Cloak Proxy sends the body back in the charset its Content-Type names and recalculates Content-Length when you click Execute, so you don’t need to update it.
Edit a paused response
Section titled “Edit a paused response”A paused response. Pick a status from Quick Status to test error handling.
- Status code. The reason phrase updates as you type.
- Quick Status: common codes in one click.
- Format or minify a JSON body.
The editor shows Response paused and the request it answers (Response to GET …). You can change:
| Field | Notes |
|---|---|
| Status code | Any number. The standard reason phrase is shown next to it and sent with the response. |
| Quick Status | Sets the status to 200, 201, 204, 301, 304, 400, 401, 403, 404, 409, 422, 429, 500, 502 or 503. |
| Headers | Same editor as for requests. |
| Body | Same editor as for requests, decompressed. |
Execute, Cancel or Abort
Section titled “Execute, Cancel or Abort”Each paused message waits until you decide what to do with it.
| Button | Shortcut | What happens |
|---|---|---|
| Execute | ⌘ ↩ | Sends the message on with your edits. |
| Cancel | Esc | Sends the original message on and throws away your edits. |
| Abort | Drops the message. The app’s connection is closed, as if the network failed. The request shows as failed with Aborted at the request breakpoint or Aborted at the response breakpoint. | |
| Continue All | At the bottom of the list. Sends every paused message on, unedited (the same as Cancel for each). |
Copy the paused request
Section titled “Copy the paused request”The Copy menu in the editor’s header copies the paused message as it stands, with your edits, so you can replay it from Terminal, paste it into a ticket or save it in a script before you decide what to do with it. What it copies is what Execute would send: the method, URL, headers and body you see, with Content-Length updated for an edited body.
| Item | What it copies |
|---|---|
| Copy URL | The URL. |
| Copy as cURL | A curl command that sends the request. |
| Copy as › | The request as code, in any format from Copy as code. |
| Copy Request | The request as raw HTTP: the request line, the headers and the body, decompressed. |
| Copy Response | The paused response as raw HTTP: the status line, the headers and the body, decompressed. Only when a response is paused. |
Copying doesn’t send anything: the message stays paused until you click Execute, Cancel or Abort. Like Copy as code, it includes every header as it is, Authorization and cookies too.
In the Linux beta, the Copy menu comes with the next Linux release.
The Breakpoint window
Section titled “The Breakpoint window”The window opens by itself when something pauses. You can also open it with Tools › Breakpoint Window, or by clicking N paused at breakpoint in the main window’s bottom bar.
| Part | What it shows |
|---|---|
| Paused list | Every paused message: a Request or Response badge, the method, the time it paused, the URL and Rule: …. Select one to edit it. |
| Count | N paused at the bottom of the list. |
| Editor | The selected message. |
| Empty window | Nothing paused, with Manage Breakpoint Rules… to open the rules. |
Several requests can be paused at once, for example when an app loads a page. Each one waits on its own; deciding on one doesn’t release the others.
Breakpoints with other tools
Section titled “Breakpoints with other tools”- Request scripts run before the request pauses, so you see their changes. Response scripts run before the response pauses.
- Responses from Map Local and Mock Sets pause too, so you can tweak a mock before the app sees it.
- Editing the URL at the request breakpoint changes what Map Local, Mock Sets and Map Remote see. The response breakpoint still matches the original URL, so it pauses even if you changed the URL.
- Requests sent with Repeat or Compose pause like live traffic.
See What happens when several tools match for the full order.
Resolve breakpoints from an AI assistant
Section titled “Resolve breakpoints from an AI assistant”The MCP server has two tools for breakpoints: list_paused lists what’s waiting, and resolve_paused sends a message on with edits (send), unedited (send_original), or drops it (abort). See the MCP tools reference.