mardi 26 mars 2019

After latest update of Xcode, Web Inspector is not working... any ideas how to fix?

I've posted this as a bug on Apple's Bug Report site. I thought I'd post here too and see what I can find out as to how I might fix this...

Area:

Debugging WKWebView with Xcode using Web Inspector in Safari. I'm running on MacOS Mojave Version: 10.14.3 (18D42).

Summary:

After letting upgrade of Xcode run (Version 10.2 (10E125)), when I pick the proper Device option from Safari's [Develop] menu (Version 12.0.3 (14606.4.5) of Safari), the Web Inspector comes up while running the app like before, but it displays as basically blank and useless.

Steps to Reproduce:

1- start iOS app in the Simulator that has a WKWebView that is successfully displaying a web page that has runnable JavaScript in it. Here I've picked the iPhone 6 Simulator (Figure 1) Here I've picked the iPhone 6 Simulator in Xcode

. running app (Figure 2) App running in simulator... WKWebView takes whole screen

. enter image description here (Figure 3) screen after clicking [Run Db Startup Code] button (notice new info under "Test Info:")

. enter image description here (Figure 4) JS code that runs when this button is clicked.

. 2-Go to Safari window and pick [Develop] menu.

3- Pick Simulator option for the device like: Simulator -- iPhone 6 -- iOS 12.2 (16E226)

4- Pick the "index.html" option enter image description here (Figure 5) Picking option in Safari after app in iPhone Simulator has been started

.

5- Web Inspector comes up, but none of the page's resources are listed (including index.html) enter image description here (Figure 6) Web Inspector brought up ... this is the Debugger tab. Nothing appears.

.

enter image description here (Figure 7) Web Inspector, Resources tab... also blank. Clicking the Refresh button above the Network tab does nothing.

.

6 - Clicking the Web Inspector's refresh button does nothing

Expected Results:

Resources to load, to be able to set break-points on JavaScript lines of code. to have JS code stopped on any debugger; statement to be able to step through JS code and examine current JS variable values.

Actual Results:

As said before, the web inspector window comes up basically empty (like there is no page loaded into the WKWebView at all (even though there is and I can visually see that JS code runs when I click buttons on test interface).

Note: If I try running on actual tethered device, NO option shows up in Safari's [Developer] menu!




Aucun commentaire:

Enregistrer un commentaire