简体   繁体   English

如何修复safari 6 Web检查器以使其适用于iOS设备或模拟器?

[英]How do I fix the safari 6 web inspector so that it works with iOS devices or simulators?

Whenever I try to connect the safari web inspector to a simulator or device running mobile safari in the foreground, the site that I try to inspect never fully loads in the inspector. 每当我尝试将safari Web检查器连接到前台运行移动safari的模拟器或设备时,我尝试检查的站点永远不会在检查器中完全加载。 The DOM never fills out in the dom tree view; DOM永远不会在dom树视图中填充; i have to collapse and expand the webpage in the resource view to be able to see scripts, images, frames and the like but none of the items that should show a DOM actually do. 我必须折叠并展开资源视图中的网页才能看到脚本,图像,框架等,但是没有任何应该显示DOM的项目。 Touch mode to select a specific dom element by tapping on it on the iphone/ipad doesn't work either as a result of this. 触摸模式通过在iphone / ipad上点击它来选择特定的dom元素也不会因此而起作用。

I've correctly set the relevant ios settings and mac safari settings so that safari on mac can see each device and connect to specific websites/webviews properly but the connection seems to fail somehow. 我已正确设置相关的ios设置和mac safari设置,以便mac上的safari可以看到每个设备并正确连接到特定的网站/网页,但连接似乎以某种方式失败。

I've had only moderate luck in getting it to work by clearing cookies and cache via the ios settings for safari, but even then it only successfully connects and shows me a dom part of the time. 通过ios设置为safari清除cookie和缓存,我只有适度的运气,但即便如此,它只能成功连接并向我显示大部分时间。 Has anyone else run into this? 有没有其他人遇到这个? What could be going wrong? 怎么可能出错? Is there a way to fix it? 有办法解决吗? Is it possible to use a different web inspector to debug sites on iOS (like the webkit nightly one) and if so, how? 是否可以使用不同的Web检查器来调试iOS上的站点(如每晚的webkit),如果是这样,如何?

This happens on both my 10.7 and 10.8 machines and on various different ipads. 这种情况发生在我的10.7和10.8机器以及各种不同的ipad上。 It might be an issue with our site specifically but I don't know how to narrow down what exactly. 这可能是我们网站的一个问题,但我不知道如何缩小到底是什么。

I still have this issue but what has solved it for me is when I run Safari in Private Mode. 我仍然有这个问题,但是我解决它的问题是我在私人模式下运行Safari。 Dunno why, might be chaching-related. 不知道为什么,可能与追逐有关。 Not a nice solution but will do as long as the problem persist. 这不是一个好的解决方案,但只要问题仍然存在就会发生。

These are the versions: - iOS Simulator Version 7.0 (463.9.4) - Safari Version 6.0.5 (8536.30.1) 这些是版本: - iOS模拟器版本7.0(463.9.4) - Safari版本6.0.5(8536.30.1)

我有同样的问题试用我的页面的轻版本与较少的数据(图像,脚本,CSS)加载和它工作,所以它似乎链接到页面的大小:(

您需要在Safari中启用Cookie

I have run into this. 我碰到了这个。 The only way i get the simulator to come up in web inspector is if i have a physical device attached. 我让模拟器出现在网络检查器中的唯一方法是,如果我连接了物理设备。 Then i see them both in the list to choose from. 然后我在列表中看到它们都可供选择。

I tried private mode, which gave me a slight improvement but Björn Christensson answer above is what worked for me. 我尝试了私人模式,这给了我一点点改进,但​​上面的BjörnChristensson回答是对我有用的。

Download WebKit Nightly Build ( http://nightly.webkit.org/ ) 下载WebKit Nightly Build( http://nightly.webkit.org/

This allows me to view CSS and also tap to inspect nodes on the iPad. 这允许我查看CSS并点击以检查iPad上的节点。 These 2 things did not work with the use private answer above. 这两件事与上面的私人答案无关。

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

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