How to Activate the iPhone Debug Console or Web Inspector

Use Safari's web developer tools to study problematic websites

Web Inspector is a tool web developers use to modify, debug, and optimize websites on both Macs and iOS devices.

Before iOS 6, the iPhone's Safari web browser had a built-in Debug Console that developers used to track down web page defects. If you have an iPhone running an early version of iOS, you can access the Debug Console through Settings > Safari > Developer > Debug Console. Whenever Safari on the iPhone detects CSS, HTML, and JavaScript errors, details of each are displayed in the debugger.

All the recent versions of iOS use Web Inspector instead. You activate it in the Safari settings on the iPhone or another iOS device. To use Web Inspector, you connect the iPhone to your Mac computer with a cable and open the Mac's Safari, where you enable the ​Develop menu in Safari's Advanced Preferences. Web Inspector is only compatible with Mac computers.

Illustration of person holding an iPhone and a can of bug repellant
Lifewire / Miguel Co 

Information in this article applies to iPhones and other iOS devices running iOS 6 through iOS 12 and Macs on Mac OS X 10.5 Leopard and later unless otherwise noted.

Activate Web Inspector on iPhone iOS 6 and Later

The Web Inspector is disabled by default since most iPhone users have no use for it. However, developers can activate it in just a few short steps. Here's how:

  1. Tap the Settings icon on the iPhone Home screen.

  2. Scroll down until you reach Safari and tap on it to open the screen that contains everything related to the Safari web browser on your iPhone, iPad, or iPod touch.

  3. Scroll to the bottom of the screen and tap Advanced menu.

  4. Toggle the slider next to Web Inspector to the On position.

    Path to Web Inspector on iPhone

Connect iPhone to Safari on a Mac

To use the Web Inspector, connect your iPhone or another iOS device to a Mac that's running the Safari web browser. Plug your device into the computer using a cable.

With Safari open, do the following:

  1. Click Safari in the menu bar and choose Preferences.

    Opening Safari preferences from the Safari menu bar on a Mac
  2. Click the Advanced tab in the Preferences.

  3. Select the box next to Show Develop menu in menu bar.

    Mac Advanced Safari preferences showing the Develop menu option
  4. Exit the settings window.

  5. Click Develop in the Safari menu bar and select Show Web Inspector.

    Develop drop-down menu in Safari on a Mac

Your attached iPhone or other iOS device appears in the Develop drop-down menu. With Web Inspector open, developers can inspect all the resources on a web page. The Web Inspector window contains editable HTML and notes regarding the styles and layers of the web page in a separate panel. With Safari 9 and OS X 10.9 Mavericks, Apple introduced Responsive Design Mode in Web Inspector. Developers use this built-in simulator to preview how web pages scale to different screen sizes, resolutions, and orientations.