Seth
Seth

Reputation: 984

Debugging web app on ipad without Mac

I'm tasked with fixing a bug on the mobile version of a project I just came on (and still learning my way around it). Its a heavy use 24/7 kinda job, so not keen on the trial and error guess/upload/test style of debugging.The bug is that almost none of the controls, particularly tabs, respond to user "clicks" on the ipad. The app was developed in asp.net MVC4 and I work on windows 7 in vs2012.

We are not a mac shop, but still need to support the Ipad and phone.

This is probably a simple question: but my searching keeps taking me here: iOS6 - removed console log for IPad - how to use web inspector on windows? and here: Accessing iOS Safari Web Inspector from Windows Machine.

I need a way to gather actually diagnostics, like what would be available in web inspector, without having to acquire a mac.

Upvotes: 1

Views: 3298

Answers (1)

DaAwesomeP
DaAwesomeP

Reputation: 585

Use weinre. It runs a webserver that that can repond to a bookmarklet or <script> to run a remote inspector.

weinre is a debugger for web pages, like FireBug (for FireFox) and Web Inspector (for WebKit-based browsers), except it's designed to work remotely, and in particular, to allow you debug web pages on a mobile device such as a phone.

Get NodeJS, NPM, and a webkit-based desktop browser to run it.


To install with yarn:

yarn add --dev weinre

then because it's no longer maintained, you may get TypeError: mime.lookup is not a function when you try to use it, then you have to edit node_modules/connect/lib/middleware/static.js and change require('mime') to require('mime-types') on line 21 (thanks). Then start with

yarn run weinre

If you now open the url showed there, you'll see the bookmarklet you can use etc. (Note: If using this from other computers, you may have to open local firewall ports, and if debugging a https site you may have to add a reverse proxy with cors headers.)

Upvotes: 2

Related Questions