Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible debug iOS Chrome on Windows 10?

As the title says, I need to debug a website opened with mobile Chrome on an iOS device (iPod, iPad etc.) on Windows 10. I have successfully set up iOS Safari debugging on Windows 10 via Chrome DevTools (GitHub repo , helpful comment). I would love to do the same thing except with Chrome or Firefox and not Safari. Is it even possible?

like image 975
Tomeister Avatar asked Jun 22 '18 11:06

Tomeister


Video Answer


2 Answers

Yes it is. You'll need node first and (web inspector enabled on iOS>Settings>Safari) then...

  1. Install weinre sudo npm -g i weinre (or) npm i -g weinre
  2. Run weinre weinre --boundHost YOUR_IP:PORT
  3. When it runs copy paste the following script to your code

<script src="http://YOUR_IP_ADDRESS:PORT/target/target-script-min.js"></script>

  1. Connect your iOS device via USB

  2. Go to http://YOUR_IP_ADDRESS:PORT/client/ from your browser (your pc) where you want to debug and you'll see your device.

Error in Step 2

If you see any error in step 2, first check your IP via ipconfig and then bound a similar IP with a free port that is not being used. For example my local ip is 192.168.1.5 so I used the same with a free port - 192.168.1.5:4576

Error in Step 5

If you can't see your device try adding a name myDevice to the script in Step 3 as follows

<script src="http://YOUR_IP_ADDRESS:PORT/target/target-script-min.js#myDevice"></script>

Then in Step 5, when reaching your device add the device name to the URL as http://YOUR_IP_ADDRESS:PORT/client/#myDevice

SUCCESS

If everything runs fine, you'll be able to inspect your code, read indexedDB, session and localStorage and see outputs in Console among other dev tools.

like image 58
Robot Boy Avatar answered Oct 12 '22 13:10

Robot Boy


I found this link very helpful.

No other answer or article on web is more straight forward than this: washamdev

It's a verbose article so I cannot put everything here. Hope the link does not break.

like image 3
FLICKER Avatar answered Oct 12 '22 15:10

FLICKER