Safari web inspector is only showing Sources, Console and Audit
After upgrading to Xcode 11.3.1, I am having problems using Safari web inspector with the iOS 12.1 simulator. Every time that I run an app inside of an iOS 12.1 simulator device, it will show up in the Safari debug menu and allow me to connect to it, but the only tabs I will see are Sources, Console and Audit.
Here is a screenshot of the inspector attached to an instance of the Safari browser inside of the simulator.
Is there any way to resolve this?
Environment:
- MacOS 10.14.6 (18G95)
- Xcode 11.3.1
- Safari 13.1 (14609.1.20.111.8)
- Simulator Version 11.3.1 (SimulatorApp-912.5.1 SimulatorKit-570.3 CoreSimulator-681.17.2)
Solution 1:
Web Inspector engineer here...
This appears to be a bug in Web Inspector, and we are investigating the issue. Does it happen if you use a recent Safari Technology Preview to inspect your older iOS devices?
In addition to asking on SO.. it is strongly recommended to report bugs pertaining to developer tools at https://feedbackassistant.apple.com/ so that you get notifications about followup questions and when a fix has been shipped.
EDIT(May 14): The issue is fixed in our tree and the fix should be included in Safari Technology Preview 107 and the next major Safari release. Stay tuned for release notes.
Solution 2:
I don't yet want to update my macOS from High Sierra, but I still run into this bug (even on a clean installed test system).
Elsewhere it was suggested to use Safari Technology Preview - but now it's only for Catalina an Big Slur.
Fortunately you can still download older versions using Archive.org (bless their hearts).
This is the latest I found for High Sierra (Release 80, Posted: April 12, 2019):
https://web.archive.org/web/20190420021102/https://developer.apple.com/safari/download/
I guess you can find a later one for Mojave too.
Update June 2021
For macOS Big Sur 11.4, you can download STP 125.
Solution 3:
(This is answer is less of a fix, and more of a superior alternative I wish I had discovered much sooner.)
You can just debug iOS WebView with Chrome Dev Tools instead of Safari!!
Windows
You can follow this guide to debug iOS webview on Windows with Chrome DevTools. (Tested and works with iOS 9 and iOS 14 so far!!) Edit: not working with iOS 9 today.... not sure what changed...
Linux / Mac
I believe you can basically follow the windows guide above for linux and Mac as well. (Comments confirming/denying welcome!)
Troubleshooting any part of the guide
For any part of the guide that doesn't work (because out of date or linux/Mac), you can follow the instructions that are included directly with the tools that make this possible:
- remotedebug-ios-webkit-adapter
- ios-webkit-debug-proxy (used by remotedebug-ios-webkit-adapter)