Edit a request and response while the app waits
A breakpoint in Microkoi Bench holds an exchange: the request before it goes to the server, the response before it reaches your app. Change the status code, headers or body and let it go. That is how you check how your app copes with a different status, a missing field or an empty list without changing the server or the app.
Your first pause in a minute
- 1
Set a breakpoint
Select an exchange in “Traffic” and click “Breakpoint” in the exchange panel. The breakpoint takes the same method, host and path, for both the request and the response.
- 2
Repeat the action
Do the same thing in your app. When a request matches the breakpoint, “Request paused” opens over any section, followed by “Response paused”.
- 3
Edit and let it go
Change the status, headers or body and click “Continue” or press ⌘↩. “Continue unchanged” lets the exchange through as is, and “Cancel request” stops it from going any further.
One exchange, exactly as the test needs it
A mock answers every request the same way. A breakpoint edits one specific exchange at the moment of the request.
The request before the server
The method, the full URL with host and query parameters, headers and body. If the edited request matches a mock, the mock answers.
The response before the app
A status code from 200 to 599 with its standard name next to it, headers and body. A compressed response is shown decompressed.
Precise rules
Method, host and path with
*and**wildcards, as in mocks. A breakpoint pauses the request, the response or both.A queue of paused exchanges
Several exchanges wait in a queue: tabs above the editor, a “2 of 4” position, decisions one at a time.
Your app never hangs
Without a decision, the exchange continues on its own after 10 minutes. The main switch and stopping the proxy release everything at once.
Only on your computer
Breakpoints are stored separately for each workspace and never go into the project folder or git.
How it works
The paused exchange editor
As soon as an exchange matches a breakpoint, “Request paused” or “Response paused” opens over any section. Under the title it says that the app is waiting, with a countdown to the automatic continue.
- “Continue” sends the edited exchange: ⌘↩ on macOS, Ctrl+Enter on Windows and Linux
- “Cancel request” stops the exchange: the app gets a 502 with the text “Microkoi Bench: response canceled at a breakpoint”
- “Collapse” and Esc close the editor, but the exchange keeps waiting for a decision, and your edits stay until you open it again
- A code outside 200–599 is highlighted with “Use a code from 200 to 599” next to it, and “Continue” is disabled
Rules: method, host and path
The “Breakpoints” button in “Traffic” opens the “Breakpoints” window. A breakpoint has a method or “Any”, a host where an empty field means any host, a path with * wildcards for exactly one segment and ** for any tail, and “Request” and “Response” checkboxes. Host and path are matched as in mocks, without parameters after ?.
- “Breakpoint” in the exchange panel sets a breakpoint on the same method, host and path, for both the request and the response
- “Add breakpoint” creates a breakpoint on
/**of any host — narrow it down right away - Changes are saved immediately, and a breakpoint is deleted by clicking the trash button twice
- When breakpoints are on, the button is highlighted and shows their number: “Breakpoints · 2”
- “Pause exchanges” turns all breakpoints off at once without deleting them and immediately releases everything that is waiting
Body and headers
A text body up to 1 MB is edited right in the field, and an empty field means an empty body. Bench sets the body length itself. In “Headers” you can change values, add pairs and uncheck a pair so the header is not sent.
- A response compressed with gzip or deflate is shown decompressed. An edited one goes out uncompressed and without
Content-, while one released unchanged stays compressed, as it arrivedEncoding - A body larger than 1 MB, binary or compressed in an unknown way goes through as is, while the method, URL, status and headers can still be edited
The queue and collapsed exchanges
If several exchanges are paused, they wait in a queue: above the editor are tabs with the method, URL and stage, and under the title a position like “2 of 4”. Exchanges are decided one at a time, and after each decision the next one opens.
- While collapsed exchanges wait, “Traffic” shows the “N exchanges paused. The app is waiting for your decision.” bar
- “Open” brings the editor back on the first exchange in the queue, and “Continue all” releases the whole queue unchanged
- The “Traffic” item in the sidebar shows a counter of paused exchanges
- No more than 32 exchanges wait at a time, and the rest pass without pausing
Waiting and timeouts
A paused exchange waits for a decision for no more than 10 minutes and then continues unchanged. Your app may give up earlier because of its own timeout, and then the exchange leaves the queue on its own. For testing, a client with a long timeout is more convenient.
- Stopping the proxy, switching workspaces and quitting Bench release everything that is waiting, unchanged
- While a response is paused, the proxy does not read the body from the server: if the server closes the connection, the app gets a truncated response
- If the app cancels the request, the exchange leaves the queue and never reaches the server
How it shows up in traffic
Traffic records what actually went to the server and came back to the app, that is, with your edits. Time spent at a breakpoint is subtracted from the duration: the phases and total time show the server’s work, not the time you spent in the editor.
- An exchange that was paused is marked in the first column with a yellow pause icon: “Paused at a breakpoint”
- A canceled one is marked with a red crossed-out circle: “Canceled at a breakpoint”, and the reason is shown in the exchange panel
- If a mock answered or chaos took effect, the column shows their icon, and the pause appears as a second line of the tooltip
Questions and answers
How is a breakpoint different from a mock?
A mock answers every matching request the same way and lives in the project folder. A breakpoint edits one specific exchange right at the moment of the request and is stored only on this computer. If you need the same response every time, a mock is more convenient.
Do I need to change the server or the app?
No. Breakpoints trigger in the Bench proxy: your app sends traffic through Bench, as in regular debugging, and the server receives the already edited request.
What can be paused and what can’t?
HTTP/1.1 and HTTP/2 requests to recorded hosts. Other hosts pass through a tunnel without decryption and cannot be paused. WebSockets and responses from mocks and mock servers are not paused: a mock server answers the app directly, without the proxy. A request that a mock will answer is paused — before mocks are checked.
What if my app “hangs” at a breakpoint?
Turn off “Pause exchanges” in the “Breakpoints” window or stop the proxy: everything that is waiting goes through unchanged right away. Without a decision, the exchange continues after 10 minutes anyway.
Will my breakpoints reach my teammates?
No. Breakpoints are a personal debugging tool: they are stored in the app’s data folder separately for each workspace, along with the state of the main switch, and never go into git. They stay in place after Bench restarts.