|
| 1 | +--- |
| 2 | +title: "Debug URLSession Requests Without a Proxy" |
| 3 | +pageTitle: "Debug URLSession Requests Without a Proxy or Certificates" |
| 4 | +description: "Debug URLSession requests in the iOS Simulator without proxy setup or certificates. Inspect responses, failures, cURL, and AI-ready exports." |
| 5 | +publishedTime: 2026-06-18T18:55:00.000Z |
| 6 | +image: ../../docs/docs/features/networking/network-traffic-monitoring/network_monitor_logs.png |
| 7 | +imageAlt: "RocketSim Network Monitor showing URLSession requests and app logs next to a running iOS Simulator app." |
| 8 | +imageCaption: "RocketSim shows URLSession requests and app logs in one timeline: 1) switch between requests, logs, or both; 2) inspect debug logs next to the request that caused them." |
| 9 | +--- |
| 10 | + |
| 11 | +import { Image } from "astro:assets"; |
| 12 | +import networkInsightsOverview from "../../docs/docs/features/networking/network-traffic-monitoring/network-insights-overview.png"; |
| 13 | +import networkRequestDetail from "../../docs/docs/features/networking/network-traffic-monitoring/network-request-detail.png"; |
| 14 | +import networkRequestPromptsToolbar from "../../docs/docs/features/networking/network-request-prompts/network-request-prompts-toolbar.png"; |
| 15 | + |
| 16 | +**Debugging URLSession requests without a proxy** sounds like a small workflow improvement until you hit a network bug right before shipping. You open the app, reproduce the issue, and realize you did not start your proxy, forgot to trust a certificate, or missed the exact request that failed. |
| 17 | + |
| 18 | +Proxy tools like Charles Proxy and Proxyman are powerful, and I still think they have a place. However, most everyday iOS Simulator debugging is simpler: I want to see which `URLSession` requests fired, what the response looked like, why a call failed, and whether the app made the same request too many times. RocketSim's [Network Monitor](/docs/features/networking/network-traffic-monitoring) focuses on that loop. |
| 19 | + |
| 20 | +The banner above shows why I like this view during development. The first callout highlights the filters for **Network**, **Logs**, or **All**, while the second callout shows debug logs mixed into the same timeline as your requests. Seeing both together makes it much easier to understand what happened before and after a failing API call. |
| 21 | + |
| 22 | +## Why proxy setup slows you down |
| 23 | + |
| 24 | +Proxy debugging often starts with setup instead of debugging. You configure a system proxy, install a certificate, trust it on the Simulator, enable SSL proxying for the right host, and then hope the app is using a networking stack that goes through the path you expect. |
| 25 | + |
| 26 | +That is fine when you need full proxy power. You might want to rewrite responses, inspect traffic from an app you cannot instrument, or test low-level proxy behavior. In those cases, a dedicated proxy tool is the right choice. |
| 27 | + |
| 28 | +However, if you are debugging your own app during normal development, the setup can be too much. The bug happens, you want the request details now, and you do not want to restart the whole flow just because your proxy was not ready. |
| 29 | + |
| 30 | +## Use RocketSim's Network Monitor |
| 31 | + |
| 32 | +RocketSim takes a different route. With [RocketSim Connect](/docs/getting-started/setting-up-rocketsim-connect), your debug build connects to RocketSim locally and sends captured `URLSession` activity over Bonjour. There is no system proxy setup and no custom certificate to trust. |
| 33 | + |
| 34 | +<figure> |
| 35 | + <video |
| 36 | + controls |
| 37 | + playsinline |
| 38 | + poster="/features/posters/network-monitoring-demo.jpg" |
| 39 | + class="w-full rounded-2xl" |
| 40 | + > |
| 41 | + <source src="/features/network-monitoring-demo.mp4" type="video/mp4" /> |
| 42 | + </video> |
| 43 | + <figcaption> |
| 44 | + RocketSim's Network Monitor shows URLSession requests, responses, logs, |
| 45 | + metrics, and cURL exports next to your Simulator workflow. |
| 46 | + </figcaption> |
| 47 | +</figure> |
| 48 | + |
| 49 | +Once connected, RocketSim shows recent requests directly in the side window and a full Network Monitor when you need more detail. You can inspect headers, request and response bodies, status codes, metrics, and logs in one place. |
| 50 | + |
| 51 | +In my own workflow, that timeline is the part I care about most. A single failed response is useful, but seeing the order around it is often what explains the bug. Did the token refresh run first? Did the app call the endpoint twice? Did a warning log appear before the request failed? |
| 52 | + |
| 53 | +## Inspect responses and failures |
| 54 | + |
| 55 | +A network bug rarely starts with "the backend is down." More often, it is a missing header, an unexpected response body, a stale token, a validation error, or a request that fires at the wrong time. |
| 56 | + |
| 57 | +<figure> |
| 58 | + <Image |
| 59 | + src={networkRequestDetail} |
| 60 | + alt="RocketSim Network Monitor showing URLSession request details with headers, response body, metrics, and cURL export options." |
| 61 | + class="w-full rounded-2xl" |
| 62 | + /> |
| 63 | + <figcaption> |
| 64 | + The request detail view gives you headers, response bodies, metrics, and a |
| 65 | + cURL export for the selected URLSession request. |
| 66 | + </figcaption> |
| 67 | +</figure> |
| 68 | + |
| 69 | +RocketSim helps you answer those questions quickly: |
| 70 | + |
| 71 | +- Which URLSession request failed? |
| 72 | +- Which status code came back? |
| 73 | +- What did the response body contain? |
| 74 | +- Which app log appeared around the same time? |
| 75 | +- Can I copy the request as cURL and reproduce it? |
| 76 | + |
| 77 | +Copying a request as cURL is especially useful when you need to share a failing call with a teammate or backend engineer. It moves the conversation from "something is wrong" to "this exact request returns this exact response." |
| 78 | + |
| 79 | +If you only need a quick overview, the side window keeps recent traffic visible while you keep using the Simulator. If you need the full detail, the Network Monitor gives you the deeper request view. |
| 80 | + |
| 81 | +## Find duplicate calls |
| 82 | + |
| 83 | +Network debugging is not only about failures. A lot of app performance issues come from repeated or wasteful requests: the same endpoint fires when a view reappears, a list reloads too often, or a detail screen fetches more data than it needs. |
| 84 | + |
| 85 | +[Networking Insights](/docs/features/networking/networking-insights) gives you a historical view of those patterns. You can look for duplicate calls, caching opportunities, slow endpoints, failure spikes, and the most requested URLs across sessions. |
| 86 | + |
| 87 | +<figure> |
| 88 | + <Image |
| 89 | + src={networkInsightsOverview} |
| 90 | + alt="RocketSim Networking Insights overview showing failure spikes, duplicate calls, caching opportunities, slow endpoints, and most requested URLs." |
| 91 | + class="w-full rounded-2xl" |
| 92 | + /> |
| 93 | + <figcaption> |
| 94 | + Networking Insights turns captured traffic into patterns you can act on, |
| 95 | + like duplicate calls, slow endpoints, and failure spikes. |
| 96 | + </figcaption> |
| 97 | +</figure> |
| 98 | + |
| 99 | +This is the kind of debugging I like because it turns invisible waste into something concrete. You might feel that a screen is slow, but seeing five duplicate calls in a row makes the fix obvious. |
| 100 | + |
| 101 | +## Export requests to AI |
| 102 | + |
| 103 | +RocketSim can also export network requests as redacted prompts for AI-assisted debugging. Instead of pasting raw request data into Claude or ChatGPT, you can use [AI Network Request Prompts](/docs/features/networking/network-request-prompts) to generate focused summaries. |
| 104 | + |
| 105 | +The built-in prompt types target common problems: |
| 106 | + |
| 107 | +- **Redundant calls & caching** for duplicate requests and missing cache strategy |
| 108 | +- **Performance / overfetching** for slow endpoints and oversized payloads |
| 109 | +- **Failures & error spikes** for non-2xx responses and likely causes |
| 110 | + |
| 111 | +<figure> |
| 112 | + <Image |
| 113 | + src={networkRequestPromptsToolbar} |
| 114 | + alt="RocketSim Network Monitor toolbar showing Copy export and Copy prompt menus for AI-assisted URLSession debugging." |
| 115 | + class="w-full rounded-2xl" |
| 116 | + /> |
| 117 | + <figcaption> |
| 118 | + Copy export and Copy prompt turn a filtered request set into redacted, |
| 119 | + AI-ready debugging context. |
| 120 | + </figcaption> |
| 121 | +</figure> |
| 122 | + |
| 123 | +The redaction is important. Network traffic often contains bearer tokens, user identifiers, or private payloads. RocketSim keeps the export compact and removes sensitive values so you can ask an AI assistant for help without dumping raw traffic into a chat. |
| 124 | + |
| 125 | +## Keep proxy tools for proxy-specific jobs |
| 126 | + |
| 127 | +Proxy tools are still the right choice when you need proxy-specific power: response rewriting, breakpoints, advanced SSL inspection, or traffic from apps you cannot instrument. Tools like [Charles Proxy](https://www.charlesproxy.com/) and [Proxyman](https://proxyman.io/) are excellent for those jobs. |
| 128 | + |
| 129 | +RocketSim is for the everyday debug-build loop. You are working on your own iOS app, running it in the Simulator, and you want request visibility without setup friction. That covers a lot of debugging sessions. |
| 130 | + |
| 131 | +The nice part is that both workflows can exist together. Use RocketSim for the fast loop, then reach for a full proxy when the bug specifically needs proxy behavior. |
| 132 | + |
| 133 | +## Conclusion |
| 134 | + |
| 135 | +Debugging URLSession requests without a proxy is mostly about removing friction. If your debug build can show requests, responses, failures, logs, cURL exports, historical insights, and AI-ready summaries right next to the Simulator, you can catch many issues before they turn into longer debugging sessions. |
| 136 | + |
| 137 | +If you have a network issue to investigate in your own app, install [RocketSim from the Mac App Store](https://apps.apple.com/app/apple-store/id1504940162?pt=117264678&ct=debug-urlsession-requests-without-proxy&mt=8) and follow the [Network Monitor documentation](/docs/features/networking/network-traffic-monitoring). You can also read Apple's [`URLSession` documentation](https://developer.apple.com/documentation/foundation/urlsession) if you want to revisit the API RocketSim observes in debug builds. Feel free to reach out on [X/Twitter](https://x.com/twannl) or [open an issue on GitHub](https://github.com/AvdLee/RocketSimApp/issues) if you have ideas for better network debugging workflows. Thanks! |
0 commit comments