简体   繁体   English

如何在WKWebView上启用Safari Web检查器?

[英]How can I enable Safari web inspector on WKWebView?

I have a hybrid application that uses the WKWebView to display large amounts of text and this in turn uses Javascript extensively to do text analysis. 我有一个使用WKWebView来显示大量文本的混合应用程序,而该应用程序又广泛使用Javascript进行文本分析。 We're currently facing performance problems and I'd like to use the Safari Inspector the same way I used with the previous version of the application that uses the UIWebView. 我们目前面临性能问题,我想使用Safari Inspector的方式与使用UIWebView的早期版本的应用程序相同。 Problem is, I have enabled the Developer menu in Safari but I can't bind the web inspector on my iPad app. 问题是,我已在Safari中启用“开发人员”菜单,但无法在iPad应用程序上绑定Web检查器。

Given that this used to work with the UIWebView, am I missing something new? 鉴于这曾经与UIWebView一起使用,我是否缺少新的东西? Are there any other settings I need to fiddle with? 我还有其他需要摆弄的设置吗?

Try running the application on the iPad via Xcode. 尝试通过Xcode在iPad上运行该应用程序。 This should whitelist it for inspection (during development only, of course). 这应该将其列入白名单以进行检查(当然,仅在开发过程中)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用Safari的网络检查器在WKWebView中调试用户javascript - Cannot debug user javascript in WKWebView using safari's web inspector 在Safari中使用网络检查器调试javascript时如何删除此黄色框 - how do i remove this yellow box while debugging javascript using web inspector in safari 尝试在移动 Safari 上调试 Javascript,但当 iPhone 插入 Mac 时,桌面 Safari 中的“在设备上启用网络检查器”灰显 - Trying to debug Javascript on Mobile Safari but "Enable web inspector on device" grayed out in Desktop Safari when iPhone plugged into Mac 如何强制 safari 启用我的网站 javascript? - How can I force safari to enable my website javascript? 在Safari Web Inspector中调试Web Workers - Debugging Web Workers in Safari Web Inspector 在UIWebView中的Safari Web Inspector中查看Javascript源 - Viewing Javascript source in Safari Web Inspector in a UIWebView Safari 11在Web检查器上调试时崩溃 - safari 11 crashing when debugging on web inspector 使用Safari Web检查器调试内存泄漏? - Using Safari web inspector to debug memory leak? Safari Web Inspector - 长字符串值被截断 - Safari Web Inspector - Long string values truncated macOS 应用程序中的 WKWebView Web 检查器无法呈现并闪烁/闪烁 - WKWebView web inspector in macOS app fails to render and flickers/flashes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM