Reputation: 10509
My ASP.NET MVC web site markup looks "wrong" in iOS (both iPad and iPhone). In desktop Safari Chrome, IE, etc. I just use and embedded developer tools in the browser to locate problems.
Is there a way to debug iOS Safari (via some emulator) from Windows. I also have Mac with xCode at hand, if it provides the ways to facilitate the process.
Upvotes: 1
Views: 2097
Reputation:
I know this is quite an old question, but since I run into this myself recently, and found a solution, let me share it here with anyone else that might come looking.
The weinre project offers a remote debugger that works more or less like the old version of webkit dev tools. While it's not as fully featured as proper remote debugging tools found in Safari, it can get the job done when working with HTML and CSS.
The weinre package is available on npmjs.com and it requires NodeJS / NPM installed on your system. It can debug any app running any browser, and works on all platforms where NodeJS is supported including Windows.
To install:
npm i -g weinre
Then start it on port 9000 (or whatever port you want):
weinre --httpPort 9000
Visiting localhost:9000 gives you access to instructions on how to instrument the web page you are testing (look under Target Script section). For example add this to your page:
<script src="http://localhost:9000/target/target-script-min.js#anonymous"></script>
Once the page is instrumented, you can go to the debug interface pointed to by the instructions page.
Upvotes: 0
Reputation: 5123
On your mac you can open the iOS Simulator (previously the iPhone simulator). If you have XCode you have the simulator. Just open the simulator, open Safari and navigate to your page from there, just as you would in a normal browser.
Since Mobile Safari doesn't have a capable HTML/CSS inspector Firebug Lite might work.
Upvotes: 1