• Stars
    star
    191
  • Rank 202,877 (Top 4 %)
  • Language
    PowerShell
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Remotely debugging iOS Safari on Windows and Linux

Remote Debugging iOS Safari on Windows and Linux

Using this project you can debug your websites and web applications running in iOS Safari from a PC running Windows or Linux.

It provides a free and up-to-date alternative to the discontinued remotedebug-ios-webkit-adapter by RemoteDebug and is the spiritual successor to the abandoned webkit-webinspector by Arty Gus. It is a free and open source alternative to inspect.dev.

The setup scripts (generate.sh or generate.ps1) download the latest version of WebKit's built-in WebInspector and patch it to work with the WebSocket ios-webkit-debug-proxy provides and to be compatible with Chromium based browsers.

Requirements for running

  • ios-webkit-debug-proxy
    • On Windows, it will automatically be downloaded, but you must also install iTunes for it to work
    • For Linux, please follow the installation instructions.
  • Node.JS http-server or Python or PHP
    • If you have Python or PHP on your system, you don't need to change anything
    • If you have Node.JS on your system, just run npm i -g http-server and you're set.
  • A Chromium based browser
    • like Google Chrome, Edge or Opera
  • or WebKit based browser
    • like Epiphany/GNOME Web

Requirements for setup

  • git (required by generate.sh or generate.ps1) for downloading WebKit source code
    • On Windows, I suggest using git for Windows in PowerShell
    • On Linux, I suggest installing git from your package manager

Instructions

Setup

  1. Clone this repository to your PC
  2. On Windows, run generate.ps1. On Linux, run generate.sh.

This will result in the folder WebKit being created inside src. It contains the WebInspector files.

Running

  1. Plug your iOS device into your PC via USB
  2. On the iOS device, go to Settings->Safari->Advanced->Web Inspector and enable it
  3. Open the website you want to debug in Safari
  4. On Windows, run start.ps1. On Linux, run start.sh.
  5. Then open the Chromium or WebKit based browser of your choice with the following URL: http://localhost:8080/Main.html?ws=localhost:9222/devtools/page/1
    • If you have mutliple pages open or extensions installed, refer to http://localhost:9222/ for the page number that is at the end of the URL
  6. You should be greeted with the WebInspector and can now debug to your heart's content.

Troubleshooting

  • If you get an error like Uncaught (in promise) Error: 'Browser' domain was not found from Connection.js:162 you are trying to inspect a page that is not inspectable (this could be caused by having Safari extensions installed). Refer to http://localhost:9222/ for the available pages and put the correct one at the end of the URL (for example http://localhost:8080/Main.html?ws=localhost:9222/devtools/page/2) for inspecting the second page.
  • In case your inspector window stays empty, open the dev tools of your local browser to check the console for errors.
    • If you get an error like WebSocket connection to 'ws://localhost:9222/devtools/page/1' failed: from InspectorFrontendHostStub.js:68, try unplugging your device and plugging it back in while the site you want to debug is open in Safari. Once you see the ios-webkit-debug-proxy console window display a message like Connected :9222 to Himbeers iPad (...), refresh the inspector page inside your browser (do not use the refresh button on the inspector page, refresh the entire site from your browser).

Exiting

Windows

  • Two windows will open. One manages the web server and the other one is ios-webkit-debug-proxy.
  • To exit, close the ios-webkit-debug-proxy window, the other one will close automatically
    • Alternatively you can also press Ctrl+C in the web server window

Linux

  • Press Ctrl+C in the terminal window to exit

Known Issues

  • "Events" on the "Timelines" tab don't work
  • Canvas content doesn't show on the "Graphics" tab
  • Minor style glitches due to Webkit vs. Chromium differences

Notes

If you want to see details about how this was made, you can read a detailed explanation in HOW_IT_WORKS.md (note that this document only describes how the very first version of this tool was created and might not be completely up-to-date).

Attribution

More Repositories

1

KindleDashboard

Home Automation/Whatever dashboard designed for eInk Kindles
JavaScript
32
star
2

LibSkin

Virion for working with player skins & PocketMine plugin for stealing other player's skins
PHP
27
star
3

MagicalHourglass

A Discord bot for the PMMP community, originally made for the BoxOfDevs Discord.
JavaScript
21
star
4

HideCommands

Remove specific commands from the in-game command suggestions.
PHP
16
star
5

unicorn-hat-hd-gif-displayer

Use your Unicorn Hat HD to play a gif file! Based of https://github.com/pimoroni/unicorn-hat-hd/blob/1dda39a1074d7676fc0c5f9a44037748d32219db/examples/show-png.py
Python
11
star
6

SpoonCreator

Adding spoon features to PocketMine to create your 102% unique (totally legit) spoon is now as easy as running a script on Linux!
Shell
7
star
7

GroupJoin

Get notified when a player from a specific RankSystem or GroupSystem group joins.
PHP
5
star
8

MinecraftByteArrImageConverter

Converts a Minecraft skin byte array to a png
C#
3
star
9

Valentine-ECard-Generator

Web-App for generating meme-ish Valentine's day E-Cards using client-side JavaScript.
JavaScript
3
star
10

DiscordWidgetWrapper

Generates HTML code out of a Discord server's .json widget api URL.
PHP
3
star
11

VIP-Commands

A plugin for PocketMine
PHP
3
star
12

EntityKiller

An entity management system for your server.
PHP
2
star
13

PlayerHeadObj

PHP
2
star
14

SteakIt

A plugin for PocketMine
PHP
1
star
15

NodeMCU-Projects

Some of my NodeMCU (LUA) projects.
Lua
1
star
16

ColorId

Never forget the IDs of colored wool and clay anymore! Pocketmine plugin.
PHP
1
star
17

JoinPopup-NoMessage

A plugin for PocketMine. Download: https://imgcl.co/plugins/joinpopup-nomessage.174/
PHP
1
star
18

Powershell-youtube-dl-GUI

GUI for youtube-dl powered by PowerShell and Windows Forms
PowerShell
1
star