Windows 上的 Safari 远程调试

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12598415/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 09:55:27  来源:igfitidea点击:

Safari Remote Debugging on Windows

windowssafariios6remote-debugging

提问by Marvin Emil Brach

With the release of iOS 6, Apple implemented a feature called remote debugging

随着 iOS 6 的发布,Apple 实现了一项称为远程调试的功能

A client is having problems with my webapp since installing the new iOS 6 and I can't figure out the issue. It doesn't seem to be an issue with caching of AJAX requests, because the errors occur randomly and the problem is not (only) that results are still the same.

自从安装了新的 iOS 6 以来,客户端遇到了我的 web 应用程序的问题,我无法弄清楚问题所在。缓存 AJAX 请求似乎不是问题,因为错误是随机发生的,问题不是(仅)结果仍然相同。

So it has to be a problem with parallel AJAX-Calls

所以它必须是并行AJAX 调用的问题

To identify the problem and efficiently fix it (instead stumbling in the dark) I need a debugger. I was happy to read about the remote debugging feature but I cannot get it to work.

为了识别问题并有效地修复它(而不是在黑暗中磕磕绊绊),我需要一个调试器。我很高兴阅读有关远程调试功能的信息,但我无法让它工作。



The Questions now are:

现在的问题是:

  • Is it possible to use remote debugging in the Windows version of Safari?
  • If so, how do I activate it?
  • 是否可以在 Windows 版本的 Safari 中使用远程调试?
  • 如果是这样,我如何激活它?

采纳答案by Fabien Snauwaert

How to debug Safari iOS when you're on Windows?

在 Windows 上如何调试 Safari iOS?

  • Those nice Safari developer tools for iPhone require Safari 6, i.e. they are NOT available on Windows.There are no plans for a Windows version of Safari 6 or, as Apple put it: "Safari 6 is available for Mountain Lion and Lion. Safari 5 continues to be available for Windows." (http://en.wikipedia.org/wiki/Safari_%28web_browser%29#Safari_6)

  • If your local web server (e.g.: XAMPP) is properly configured, you shouldbe able to visit it from your iPhone once it's connected to your computer. However, on Windows, this does not work either.

  • 那些用于 iPhone 的优秀 Safari 开发人员工具需要 Safari 6,即它们在 Windows 上不可用。没有针对 Safari 6 的 Windows 版本的计划,或者,正如 Apple 所说:“Safari 6 可用于 Mountain Lion 和 Lion。Safari 5 继续可用于 Windows。” ( http://en.wikipedia.org/wiki/Safari_%28web_browser%29#Safari_6)

  • 如果您的本地 Web 服务器(例如:XAMPP)已正确配置,则在 iPhone 连接到您的计算机后,您应该可以从它访问它。但是,在 Windows 上,这也不起作用。

Alternatives:

备择方案:

  • WebKit 调试代理可能有一天会使用 Chrome 代替 Safari 提供类似的功能:https://github.com/google/ios-webkit-debug-proxy*“Windows 支持已计划但尚未实施。”
  • 使用jsconsole进行远程调试:http: //jsconsole.com/remote-debugging.html对于生产来说根本不安全(阅读警告,不要在生产中使用)但非常方便。

Hope this helps someone.

希望这可以帮助某人。

回答by John Washam

There is actually a pretty easy way to debug a website in Safari on iOS using Firefox WebIDE on a Windows machine. I wrote an answer at https://stackoverflow.com/a/35714835/306179further describing this solution.

实际上有一种非常简单的方法可以在 Windows 机器上使用 Firefox WebIDE 在 iOS 上的 Safari 中调试网站。我在https://stackoverflow.com/a/35714835/306179 上写了一个答案,进一步描述了这个解决方案。

回答by RZKY

Additionally, if you're BrowserSync(which u should, btw), you can use it's remote debugging feature which is accessible from the UI. It should work with Safari mobile.

此外,如果您是BrowserSync(您应该这样做,顺便说一句),您可以使用它的远程调试功能,该功能可从 UI 访问。它应该适用于 Safari 移动版。

There's a topic about this already: How to do remote debugging with Browser-sync?

已经有一个关于此的主题: 如何使用浏览器同步进行远程调试?

This cool feature is powered by Weinre. Not the most pleasant debugger. But it works quite well.

这个很酷的功能由Weinre提供支持。不是最令人愉快的调试器。但它工作得很好。

回答by dude

The only solution I see currently is Telerik"AppBuilder". However it's very expensive...

我目前看到的唯一解决方案是Telerik“AppBuilder”。然而,它非常昂贵......

回答by Jan

Port forwarding on ios device is easy. but the problem is, that ios does not run inspector by default on any port by default.

ios 设备上的端口转发很容易。但问题是,默认情况下,ios 不会在任何端口上运行检查器。