iOS Simulator
developer tools
iOS development
Xcode
debugging

How to open developer tools (Safari Web Inspector) on iOS Simulator

Codemia Knowledge Hub ·

For web content, open Safari on your Mac, enable `Show Develop menu in the menu bar` under `Preferences` > `Advanced`, then choose your simulator from Safari's `Develop` menu to open the Web Inspector. For native apps, debug from Xcode with LLDB and the simulator's own tools.

The iOS Simulator that ships with Xcode mimics iOS devices, so you can test on many iPhone and iPad models without physical hardware.

Opening the tools step by step

  1. Launch Xcode:
    • Open Xcode with your project open or selected, so you can run your app in the simulator.
  2. Run your application:
    • Select a simulator from the list of available devices in Xcode.
    • Click the run button to launch the app in that simulator.
  3. Open developer tools:
    • With the app running, go to the top menu bar.
    • The Simulator app has no single `Developer Tools` menu item; debugging tools live in Xcode and in Safari's `Develop` menu.
  4. Web Inspector:
    • For a web application or the mobile web portion of your app, use the Web Inspector.
    • In `Safari` on your Mac, open `Preferences`, and under the `Advanced` tab enable `Show Develop menu in the menu bar`.
    • With your app open in the simulator, go to `Develop` in Safari's menu, where your simulator is listed. Selecting it opens the Web Inspector.

What each tool does

  1. Web Inspector:
    • Debugs mobile web views: inspect HTML/CSS, set JavaScript breakpoints and view console logs.
  2. Debugging with LLDB:
    • The LLVM Debugger (LLDB) is built into Xcode and used through the console. Set breakpoints, inspect variables and evaluate expressions while the app is paused.
  3. Network Link Conditioner:
    • Simulates network conditions such as low bandwidth or latency. On the Mac it comes with Xcode's Additional Tools download and runs as a System Settings pane, and it throttles the simulator because the simulator shares the Mac's network.
  4. Environment Overrides:
    • Change settings like Dark Mode and Text Size, or simulate Motion and Orientation changes, to check that your app adapts.
Key ComponentDescriptionTypical Usage
Web InspectorInspect and debug web content in mobile views.Modify HTML & CSS, set breakpoints for JavaScript.
LLVM Debugger (LLDB)Debug native iOS applications using breakpoints and variable inspection.Debug logic, inspect variables, and test app interactions.
Network Link ConditionerSimulate various network conditions to test app performance.Test bandwidth constraints and network reliability scenarios.
Environment OverridesAdjust app settings like Dark Mode, Text Size, and other environmental variables within the simulator.Test adaptability to user-specific settings and preferences.

Typical debugging tasks

  • Testing responsiveness: use the Web Inspector on mobile web views and toggle user-agent modes to see how the app behaves on different screens.
  • Debugging animation: slow down or pause animations with the simulator's visual tools to find problems with transitions or layout changes.
  • Analyzing memory usage: profile the app with Xcode tools like Instruments while it runs in the simulator to find leaks or excessive usage.

Getting more out of the simulator

  • Keep the simulator updated: updating Xcode gets you the latest simulator features and bug fixes.
  • Simulate different devices: switch between devices and iOS versions regularly to catch device-specific issues early.
  • Use Safari's Develop menu: it sometimes has options the simulator lacks, such as viewing resource load order or capturing performance logs.

When the simulator is missing from Safari or the debugger hangs

  • Simulator not listed in Safari: make sure both the simulator and Safari have permission for incoming connections in system preferences.
  • Unresponsive debugger: restarting Xcode or resetting the simulator can fix breakpoints or LLDB that stop responding.

Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Basis Lab
No course covers this one yet

Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.

Build my course
Data Structures & Algorithms practice on Codemia

Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.

Practice algorithms