For those who, like me, despair of debugging a WKWebView running in the simulator, even though the developer tools are activated:
You have to set webView.isInspectable = true
for the WebView so that it is displayed in the developer tools in Safari on the host.