• Editor's Choice: Tech Gifts for Mom
  • Amazon Prime Tech Deals!

How to Activate the iPhone Debug Console or Web Inspector

Use Safari's web developer tools to study problematic websites

debug ios mobile safari

  • Saint Mary-of-the-Woods College
  • Switching from Android

What to Know

  • Activate Web Inspector on iOS: Go to Settings > Safari > Advanced and move the Web Inspector toggle switch to the On position.
  • Use Web Inspector on macOS: Connect your iOS device to a Mac and choose the URL to inspect from the Develop menu.

If you run into a bug or another issue with a website on Safari mobile, use the Web Inspector tool to investigate. This article explains how to use the Safari console for iPhone to debug errors with the help of your Mac computer. Instructions apply to iPhones with iOS 14, iOS 12, or iOS 11, and well as Macs with macOS Big Sur (11.0), macOS Catalina (10.15), or macOS Mojave (10.14).

Activate Web Inspector on Your iPhone or Other iOS Device

The Web Inspector is disabled by default since most iPhone users have no use for it. However, if you're a developer or you're curious, you can activate it in a few short steps. Here's how:

Open the iPhone  Settings  menu.

On an iPhone with an early version of iOS, access the Debug Console through Settings > Safari > Developer > Debug Console . When Safari on the iPhone detects CSS, HTML, and JavaScript errors, details of each display in the debugger.

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

Scroll to the bottom of the page and select Advanced .

Move the Web Inspector toggle switch to the On position.

Connect Your iOS Device to Safari on a Mac

To use the Web Inspector, connect your iPhone or another iOS device to a Mac that has the Safari web browser and enable the Develop menu .

With Safari open, select Safari from the menu bar and choose  Preferences .

Select the  Advanced  tab.

Select the Show Develop menu in menu bar check box and close the settings window.

From the Safari menu bar, select Develop and choose the name of your attached iOS device, then select the URL that appears under Safari to open the debug console for that site.

After you connect your device, use your Mac to inspect the website you want to debug and have it open in the Safari mobile browser.

What Is Web Inspector?

Web developers use Web Inspector to modify, debug, and optimize websites on Macs and iOS devices. With Web Inspector open, developers can inspect 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.

Before iOS 6, the iPhone Safari web browser had a built-in Debug Console that developers used to find web page defects. Recent versions of iOS use Web Inspector instead.

With Safari 9 and OS X Mavericks (10.9), 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.

To set up Web Inspector on your iPad, open your iPad's Settings and select Safari > Advanced , then turn Web Inspector On . Connect the iPad to a Mac computer, then open Safari on the Mac and select Safari > Preferences > Advanced , then turn on Show Develop menu in menu bar .

You cannot just connect your iPhone to a Windows PC and start using Web Inspector through Chrome like you can with a Mac. Installing package manager software can provide you a sort of workaround, but it's not recommended unless you're familiar with the package management app you intend to use.

Get the Latest Tech News Delivered Every Day

  • Add More Features by Turning on Safari's Develop Menu
  • 4 Ways to Play Fortnite on iPhone
  • How to Activate and Use Responsive Design Mode in Safari
  • How to Change the Default Search Engine in Chrome for iOS
  • What Is Safari?
  • How to Inspect an Element on a Mac
  • How to Use Web Browser Developer Tools
  • How to Clear Search History on iPhone
  • How to Disable JavaScript in Safari for iPhone
  • How to Reset Safari to Default Settings
  • How to View HTML Source in Safari
  • How to Manage History and Browsing Data on iPhone
  • 10 Hidden Features in macOS Sonoma
  • How to Manage Cookies in the Safari Browser
  • How to Change Your Homepage in Safari
  • How to Clear Private Data, Caches, and Cookies on Mac

Shattered Illusion by Chris Kenst

How to debug problems on Mobile Safari

When you are developing and/or testing a web app on iOS, having the ability to inspect and understand what is happening in the browser is incredibly useful. For just this reason Mobile Safari can use the same developer tools that are built into Safari on macOS.

To start debugging you’ll need your iOS device, a mac and a lightning cable. Then start by making sure both devices are configured to allow this.

Configure devices:

  • Confirm, you should now see a menu called Develop in the top bar
  • On your iOS device (iPhone or iPad) go to Settings > Safari > Advanced and slide the toggle on for Web Inspector.

Debug a site in Mobile Safari:

  • Connect your iOS device (iPhone or iPad) to your mac
  • On the device browse to your site in Mobile Safari
  • On your mac’s Safari, under the Develop menu you should see an option for your iOS device (either called iPhone or iPad).
  • In that sub-menu you should see the url of the website you want to debug. Click that url and it will open a new Safari window with the full Safari Dev Tools.
  • Start your investigation!

debug ios mobile safari

A few weeks back I was testing changes to review submissions (buy a product, leave a review) and on Chrome desktop everything worked fine (including Chrome’s mobile emulator). However after testing on a real device, Safari didn’t behave the same way. Luckily we were able to debug using this same method and fix those remaining issues before any customers saw problems.

It just goes to show real device testing matters!

Oh and if this article worked for you please consider sharing it or buying me coffee!

Subscribe to Shattered Illusion by Chris Kenst

How to Use Web Inspector to Debug iOS device

Prerequisites:.

  • Please note that a Mac computer is required for this process as Safari's Web Developer is only compatible with Macs
  • Make sure Safari on your Mac is the same version as Safari on your iDevice. You may need to update your iOS version or your version of Safari running on your Mac.

Use Web Inspector to debug mobile Safari

  • On your iPad, iPhone or iPod touch, tap  Settings | Safari | Advanced  and toggle on  Web Inspector.  And enable JavaScript if it isn’t already enabled.
  • On your Mac, launch Safari and go to  Safari menu | Preferences | Advanced  then check 'Show Develop menu in menu bar' if not already enabled.
  • Connect your iOS device to your Mac with the USB cable. This is critical, you must connect the devices manually, using a cable. This does not work via WiFi.
  • On your iOS device, open the website that you want to debug. Then, on your Mac, open Safari and go to the 'Develop' menu. You should now see your iOS device that is connected to your Mac. (Note: If you do not have any page open on your iDevice, you see a message saying “No Inspectable Applications.”)
  • Now debug the page that is open on your mobile Safari using the same methods you would for debugging on Mac.
  • Within the developer tools window, navigate to the 'Network' tab and export the .har file if requested.
  • https://support.apple.com/guide/safari-developer/welcome/mac
  • https://appletoolbox.com/2014/05/use-web-inspector-debug-mobile-safari/
  • https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/GettingStarted/GettingStarted.html 

Company Logo

Cookie Consent Manager

General information, required cookies, functional cookies, advertising cookies.

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings. Privacy Statement

Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.

Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.

Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.

Cookie List

Debug a Website in iOS Safari on Windows 10

  • Post author By John Washam
  • Post date May 6, 2018
  • 4 Comments on Debug a Website in iOS Safari on Windows 10

Find out how to debug a website in Safari on an iOS device using your Windows 10 PC and Chrome DevTools!

Have you ever needed to debug a website (especially JavaScript or CSS) in Safari on an iOS device but didn’t have a Mac handy? I ran into this problem, and after hours of trying other ways to debug, I finally discovered a pretty easy way to load up a debug interface on my Windows 10 PC that displayed debug info about a website in Safari on an iPad Mini.

[update 10/20/2019 – I’ve heard reports that this solution only works in iOS 12 and below, not iOS 13 and up. I can neither confirm or deny.]

[update 5/6/2018 – I previously included a solution that used WebIDE in the Mozilla Firefox browser, along with the Valence plugin. At some point, possibly beginning with iOS 9, that solution stopped working. I recently had a chance to try some other solutions and found an even easier solution that works with Google Chrome DevTools!]

Thankfully, this solution uses the Google Chrome browser on your PC and the built-in Chrome DevTools that you should already be used to, but the content is coming from the website in Safari on the iOS device.

According to what I’ve read online, it appears this solution only works with Windows 8 and up, so this may not work on Windows 7.

Let’s get to it!

I recorded a tutorial video of this solution, step-by-step, to go along with this post:

Make sure the Apple Application Support and Apple Mobile Device Support apps are installed on your Windows 10 PC.

  • Install Node.js . When you install, make sure the package manager is selected (it is by default), as we’ll be needing that to install the webkit adapter.
  • Run Windows PowerShell as administrator. Press the Windows Key + S to search, then search for “PowerShell”. Right-click on Windows PowerShell and click Run as administrator .

When that is complete, you will see an “updated 1 package in Xs” message:

You will receive confirmation when Windows PowerShell successfully installed the remotedebug-ios-webkit-adapter plugin.

  • Connect your iOS device to your Windows 10 PC via USB. If you haven’t connected the devices previously, you will need to click to trust the connection on both devices.

You need to allow the remotedebug-ios-webkit-proxy-adapter through your firewall.

Once it begins running, you will see the message remotedebug-ios-webkit-adapter is listening on port 9000 followed by iosAdapter.getTargets :

Once the remotedebug-ios-webkit-adapter plugin is running, you will see iosAdapter.getTargets continually appearing in PowerShell.

Then, make sure the target “localhost:9000” is in the list:

Add the network target localhost:9000 to the list.

  • Enable web inspector on your iOS device. On your iOS device, go to Settings > Safari > Advanced and enable Web Inspector .

Once you browse to a website in Safari on your iOS device, the site will appear under Remote Targets in Chrome.

  • Click inspect under the target. Success! You can now debug the site in Safari on your iOS device, but from Chrome DevTools on your Windows machine.

It should take you around 5 minutes to set this up, and you can be debugging a website in no time!

Using iOS 11?

You may need some extra steps to get this working on an iOS 11 device. Evidently, the version of the remotedebug-ios-webkit-adapter downloaded via npm is broken for iOS 11. The user bdice wrote a post on the remotedebug-ios-webkit-adapter Github Issues page describing how he was able to get this working on Windows 10 with an iOS 11 device. I tested it out, and here’s the lowdown:

  • Download the most recent ZIP release file of remotedebug-ios-webkit-adapter. I downloaded version 1.8.
  • Create a new folder named “ios-webkit-debug-proxy-1.8-win64-bin” in the following path (assumes you installed Node.js in the default directory): %AppData%\npm\node_modules\remotedebug-ios-webkit-adapter\node_modules\vs-libimobile\

%AppData%\npm\node_modules\remotedebug-ios-webkit-adapter\node_modules\vs-libimobile\ios-webkit-debug-proxy-1.8-win64-bin

  %AppData%\npm\node_modules\remotedebug-ios-webkit-adapter\out\adapters\iosAdapter.js

On line 132, change the proxy variable to the following value:

const proxy = path.resolve(__dirname, '../../node_modules/vs-libimobile/ios-webkit-debug-proxy-1.8-win64-bin/ios_webkit_debug_proxy.exe');

After you have jumped through all these hoops, I would restart Windows PowerShell (as Administrator!), restart Chrome, and unplug then plug back in your iOS device, just to be safe. After doing so, go back to step 6 above, and when you get to step 9, you should now see your device under the list of Remote Targets!

I tested this out, and it definitely worked!

Have you tried debugging a website in Safari on iOS with a Windows machine before? How did it work out for you, and what tool(s) did you use? Or did you have a problem with this solution you’d like to discuss? I’d love to hear from you, so let’s discuss in the comments below!

Share this:

  • Tags chrome devtools , debug , ios , javascript , remote-ios-webkit-adapter , safari

IMAGES

  1. How to Use Web Inspector to Debug Mobile Safari (iPhone or iPad

    debug ios mobile safari

  2. How to Debug Websites on iPhone Safari

    debug ios mobile safari

  3. How to Activate the iPhone Debug Console or Web Inspector

    debug ios mobile safari

  4. Enable the Safari Debug Console on iPhone & iPad

    debug ios mobile safari

  5. Debugging iOS Safari (when all you have is a Mac)

    debug ios mobile safari

  6. Debug iOS Safari from your Mac

    debug ios mobile safari

VIDEO

  1. ShoreTel Debug PRI Caller ID

  2. Live Debug iOS Apps with IDA Pro

  3. Analytics Debugger for Apps

  4. iPhone 6s Safari crash iOS 9.3 beta 1

  5. Valence

  6. How to debug your Angular app with Chrome dev tools

COMMENTS

  1. How to Use Web Inspector to Debug Mobile Safari (iPhone or iPad)

    Enable Web Inspector on iOS : Open the Settings app on your iPhone or iPad. Scroll down and tap Safari. Scroll to the bottom of the page and tap Advanced. Tap the toggle next to Web Inspector to the On position. Enable Safari Developer Mode on Mac : Open Safari on your Mac. Click Safari in the top left corner of your Menu Bar.

  2. How to Activate the iPhone Debug Console or Web Inspector

    Activate Web Inspector on iOS: Go to Settings > Safari > Advanced and move the Web Inspector toggle switch to the On position. Use Web Inspector on macOS: Connect your iOS device to a Mac and choose the URL to inspect from the Develop menu. If you run into a bug or another issue with a website on Safari mobile, use the Web Inspector tool to ...

  3. How to Debug Websites on iPhone Safari

    Connect the iOS device to the machine. Enable the Web-Inspector option. To do so: Go to Settings > Safari > Scroll down to the bottom > Open Advanced Menu>. Turn on Web Inspector. Open the desired web page to debug or preview on your mobile Safari browser. Once done, enable the Develop menu on the Mac device.

  4. Inspecting iOS and iPadOS

    To debug background scripts, open the Develop menu, find the menu item for the iOS or iPadOS device you wish to inspect, and then find the item with the name of the extension, "Extension Background Page", and the file name of the background script. Toolbar pop-up. To debug your extension's pop-up, open your pop-up on the device.

  5. Debugging Safari/Chrome on your iPhone/iPad/iOS device

    Connect your device to your Mac using a USB cable, or try the following over Wifi. On your Mac, in Safari, click the Develop menu. Near the top of the menu you should see your iPad or iPhone listed. Hover over your device in the menu and you'll see Safari with each tab listed below. Click the one you want to debug.

  6. How can I determine what crashed Mobile Safari?

    If it is getting more complicated to find out the problem in your webpage use Web Inspector to Debug Mobile Safari. It is a great tutorial for this. Using IOS Simulator I found that for this particular website all iOS version I have, 5.0, 5.1 and also 6.1, runs the page correctly with crashing the page but on device (iOS 5.0.1) still crashes.

  7. How to use Devtools for Safari Mobile View?

    To access the Responsive Design Mode, enable the Safari Develop menu. Follow the steps below to enable the Develop menu: Launch Safari browser. Click on Safari -> Settings -> Advanced. Select the checkbox -> Show Develop menu in menu bar. Once the Develop menu is enabled, it'll show up in the menu bar as shown in the image below: Note ...

  8. Debugging iOS Safari

    Then the problem is actually unique to iOS Safari. Try emulation. I happen to have a Mac, so I can have XCode installed and thus have an iOS simulator that is pretty easy to pop open. And if you can run the iOS simulator, that means you can run desktop Safari as well, and thus even have access to DevTools that can reach into the simulator. 4.

  9. How to debug problems on Mobile Safari

    Debug a site in Mobile Safari: On your mac's Safari, under the Develop menu you should see an option for your iOS device (either called iPhone or iPad). In that sub-menu you should see the url of the website you want to debug. Click that url and it will open a new Safari window with the full Safari Dev Tools. Start your investigation!

  10. How to Use Web Inspector to Debug iOS device

    Use Web Inspector to debug mobile Safari. On your iPad, iPhone or iPod touch, tap Settings | Safari | Advanced and toggle on Web Inspector. And enable JavaScript if it isn't already enabled. On your Mac, launch Safari and go to Safari menu | Preferences | Advanced then check 'Show Develop menu in menu bar' if not already enabled.

  11. How to Debug on iPhone Safari for Windows

    Apple's iOS is the second most popular mobile operating system in the world - having captured 24% of the global market share. Naturally, iOS users contribute significantly to overall mobile web traffic.Safari is the default browser for iOS devices (iPhones and iPads) and it is safe to assume that most iOS users access the internet through the Safari browser.

  12. Debugging Your iPhone Mobile Web App With Safari Dev Tools

    Feel free to comment what features you like or dislike, as well as other mobile debugging alternatives. Happy debugging! Upgrade your free Medium membership to a paid one here and for just $5/month you'll receive unlimited, ad-free, stories from thousands of writers on a wide variety of publications.

  13. Debug a Website in iOS Safari on Windows 10

    Press the Windows Key + S to search, then search for "PowerShell". Right-click on Windows PowerShell and click Run as administrator. Install the remotedebug-ios-webkit-adapter. Use the following PowerShell command: npm install remotedebug-ios-webkit-adapter -g. When that is complete, you will see an "updated 1 package in Xs" message:

  14. List of mobile browser User-Agent strings

    According to our report on the most popular mobile browsers, Safari Mobile, Chrome Mobile, and Samsung Browser are the three most used mobile browsers across the globe. The report also lists a number of other locally popular apps for web browsing, such as UC Browser, Yandex Browser, IE Mobile, Opera Mobile, Opera Mini, Firefox, and MIUI Browser.

  15. Anna Barsukova

    Liked by Anna Barsukova. I am a Mobile Growth Marketing Manager <br>I specialize in the top funnel acquisition…. · Experience: McAfee · Education: William Jessup University · Location: San ...

  16. Elvira Salamova

    Experienced Quality Assurance specialist. Skilled in software and mobile application testing. Critical thinker, problem-solver. Strong attention to details. Work well independently and in a team ...

  17. Egor Shenfeld

    Software QA Engineer | Manual & Automation | 🎗️ · Results-driven Software QA Engineer. Demonstrate strong teamwork and adaptability to new concepts and technologies. Proficient in UI and API testing of web and mobile applications. Passionate about delivering high-quality products that meet businesses' and clients' needs and expectations. <br><br> ...

  18. Debugging mobile Safari in iOS 8 and iOS 9

    Debugging iOS 8 mobile Safari requires desktop Safari 7.1, which is only available with OS X 10.9.5 or greater. What you need to do is: Update (via Apple menu->Software Update) to OS X 10.9.5 (if you haven't already) Once you've done that, you should see the Safari 7.1 in the list of pending updates

  19. ios

    Remote debugging with mobile Safari also works without a cable connection to the desktop computer. But you have to install Safari Technology Preview on your Mac as the stable Safari version currently does not support wireless remote debugging. Just do the same setup as described above, but connect the cable and open Safari on your iOS device.