如何使用Safari调试AJAX调用? [英] How to debug AJAX Calls with Safari?

查看:57
本文介绍了如何使用Safari调试AJAX调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Safari浏览器中调试 AJAX呼叫(XHR).我找到了开发人员控制台,但找不到可以看到Ajax调用的部分,就像在网络下的Chrome一样.

I need to debug the AJAX-Call (XHR) in Safari-Browser. I found the Developer-Console, but not the part where i can see the Ajax-Calls, like with Chrome where it is under Network.

有人可以告诉我正确的方法吗?

Can someone show me the right way?

推荐答案

我找到了一种在Safari中调试AJAX调用(XHR)的方法.

I found a way to debug AJAX-Calls (XHR) in Safari.

  1. 您需要获取开发"菜单项

  • Safari 菜单中,单击首选项
  • 高级标签中,启用在菜单栏中显示开发"菜单
  • In the Safari Menu Click Preferences
  • In the Advanced Tab enable Show Develop menu in menu bar

现在,您在顶部栏中获得了 Develop 菜单项.

Now you got the Develop Menu Item in the top-bar.

  1. 在要调试ajax的页面上,

  1. On the page, where you want to debug ajax,

  • 点击开发菜单项
  • 单击显示Web检查器或仅使用键盘快捷键:选项 + 命令 +
  • Click the Develop Menu Item
  • Click Show Web Inspector or just use the keyboard shortcut: Option + Command + I

在Web检查器中

  • 点击网络标签
  • 在左下角单击所有资源

发送ajax通话(例如,单击按钮或链接)

Send your ajax call (e.g. clicking button or link)

  • 现在您会在左侧窗口中找到类似的内容: index.php
  • 如果您双击此

您在新选项卡中获得了Debug/ajax结果;)


我弄错了.这就是为什么我在Network-Tab中没有接到ajax呼叫的原因:

I made a mistake. That was the reason, why i didn't get an ajax-call in the Network-Tab:

Web检查器右侧的齿轮符号后面,您可以配置以下选项:暂停时显示范围链.

Behind the gear-symbol on the right side of the Web Inspector you can configure this option: Show Scope Chain on pause.

因此,通话被暂停了,我没有ajax加载.

Because of this, the Call was paused, and i got no ajax-load.

这篇关于如何使用Safari调试AJAX调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆