Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I open developer tools on iOS Simulator?

Tags:

xcode

ios

I am wanting to open developer tools on an iOS simulator

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

  • 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

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?

like image 931
svnm Avatar asked Jan 04 '17 03:01

svnm


People also ask

How do I open developer options in simulator?

Open the in-app developer menu in the simulator by pressing cmd + D.

How do you inspect element on iPhone simulator?

You'll need to go to Settings > Advanced and check the Show Debug Menu option. Then you'll see the option to open the web inspector for the Simulator right from that menu. With the Web Inspector open, you can debug inside the Simulator just like you could right in a desktop browser with DevTools.

How do I open Xcode project in simulator?

Open Xcode and click Menu > Xcode > Preferences > Select Components, and then choose the simulator version you want to download. When a simulator is opened from AppStudio, AppStudio Player automatically installs (if necessary) and opens in it.

How do I open the keypad in iOS simulator?

Just press ⌘K it will toggle keyboard.


4 Answers

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.

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:

developer tools

like image 158
Jake Avatar answered Oct 23 '22 20:10

Jake


Download https://developer.apple.com/safari/technology-preview/

Open the website you want on your simulator.

On "Safari Technology Preview", under

Develop > Simulator --- [SimulatorName] > select your website from the list.

like image 20
itdoesntwork Avatar answered Oct 23 '22 20:10

itdoesntwork


If you are on a mac, press CMD + G while running the Simulator on XCode. This will allow you to Inspect element like you can on a web browser.

To hide the menu, press CMD + D.

It looks like the most accepted answer incorrectly assumes the asker is wondering about Safari Simulator, not XCode Simulator.

like image 9
Jamie Kent Avatar answered Oct 23 '22 18:10

Jamie Kent


If you're using React Native then you can install react-devtools globally and access devtools that way. To do this:

  1. Install it by running npm install -g react-devtools from your terminal
  2. Run react-devtools from your terminal
  3. Make sure your app is running in the simulator
  4. Open the in-app developer menu in the simulator by pressing cmd + D

You should now see the components list from the React Devtools Electron app.

like image 1
Brady Dowling Avatar answered Oct 23 '22 20:10

Brady Dowling