ios 如何在IOS模拟器上打开开发者工具

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41455862/
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-08-31 11:00:32  来源:igfitidea点击:

How do I open developer tools on IOS simulator

iosxcode

提问by svnm

I am wanting to open developer toolson an IOS simulator

我想在 IOS 模拟器上打开开发者工具

I have taken the following steps, on a 2016 Macbook running macOS Sierra 10.12.1and don't know how to get any further:

我在运行macOS Sierra 10.12.1的 2016 Macbook 上采取了以下步骤,但不知道如何进一步:

  • I have XCode installed
  • I create a new playground
  • Right click on the Xcode dock icon and click Open Developer Tool > Simulator
  • I now have an IOS simulator running whichever device I need, in my case iPhone 6 running IOS 10.0
  • 我安装了 XCode
  • 我创建了一个新的游乐场
  • 右键单击 Xcode 停靠栏图标,然后单击 Open Developer Tool > Simulator
  • 我现在有一个 IOS 模拟器,可以运行我需要的任何设备,在我的情况下是运行 IOS 10.0 的 iPhone 6

Now I am wondering what steps do I take to debug, and inspect elements on a webpage as I would in Safari or Chrome developer tools?

现在我想知道我需要采取哪些步骤来调试和检查网页上的元素,就像在 Safari 或 Chrome 开发人员工具中一样?

回答by Jake

Open Safari and go to Preferences. Under the Advanced tab, at the bottom, you'll see "Show Develop menu in menu bar". Make sure that is checked like in the image below.

打开 Safari 并转到首选项。在“高级”选项卡的底部,您将看到“在菜单栏中显示开发菜单”。确保如下图所示进行检查。

advanced preferences

高级偏好

Once that is checked, you'll see a new menu bar item named "Develop" between "Bookmarks" and "Window" in Safari's menu. Under the Develop menu, select "Simulator" and then select the site you want to debug. A new window with the developer tools will then pop up:

选中后,您将在 Safari 菜单中的“书签”和“窗口”之间看到一个名为“开发”的新菜单栏项。在“开发”菜单下,选择“模拟器”,然后选择要调试的站点。然后会弹出一个带有开发者工具的新窗口:

developer tools

开发者工具