简体   繁体   English

调试在iOS Safari上添加到主屏幕的Web应用程序

[英]Debugging web apps added to home screen on iOS Safari

I'm trying to debug a web app that is added to home screen. 我正在尝试调试添加到主屏幕的Web应用程序。 I have enabled web inspector on safari. 我在safari上启用了网络检查员。 I am able to debug the app if I open in iOS safari but when I add the app to home screen and try to debug, it shows 'No Inspectable Applications'. 如果我在iOS Safari中打开但是当我将应用程序添加到主屏幕并尝试调试时,我能够调试应用程序,它显示“没有可检查的应用程序”。 Any help would be appreciated. 任何帮助,将不胜感激。

iOS version: 11.2 iOS版:11.2

MacOS Safari version: 11.0.1 MacOS Safari版本:11.0.1

You should put focus on the app first and then press: 您应首先关注应用程序,然后按:

Option+Command+i

So you do not open the inspector in advance in this case. 因此,在这种情况下,您不要提前打开检查员。 This is not possible because you can consider it like opening a new browser tab where it makes no sense to inspect it from the inspector in another tab that is already open. 这是不可能的,因为您可以将其视为打开一个新的浏览器选项卡,在另一个已打开的选项卡中从检查器检查它是没有意义的。 Since the menu to open the inspector is missing when the PWA is opened as a desktop app, you need the keyboard shortcut to show it. 由于PWA作为桌面应用程序打开时缺少打开检查器的菜单,因此需要使用键盘快捷键来显示它。

Not sure if it's related, I had an issue where I couldn't get the inspector window to open for a cordova web app on iOS 11.2 不确定它是否相关,我有一个问题,我无法在iOS 11.2上打开检查器窗口以获取cordova Web应用程序

I found that I had to go back to (ios) settings and toggle Safari Web Inspector off and on while looking at the (osx safari) developer menu to see it and then inspect it. 我发现我必须回到(ios)设置并关闭和打开Safari Web Inspector,同时查看(osx safari)开发人员菜单以查看它然后检查它。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM