13

I am a web developer and would like to debug a webapp/website on a Windows Phone device. It would be neat to have some kind of window where I can see the javascript console.

I know how to get the console window on both Android (about:debug) and iOS (Developer console), but I have not yet figured out how on Windows Phone. Is it possibible, and if so, how?

EDIT:
What I am looking for is not remote debugging. I am looking for a debug console on the actual device.

Oskar
  • 1,597
  • 4
  • 19
  • 38
  • Have you checked: http://sgrebnov.github.com/IeMobileDebugger/ ? – Mike Mar 16 '13 at 21:34
  • 1
    Yes, but I am looking for debugging on the actual device – Oskar Mar 19 '13 at 10:44
  • Not possible as far as I know. Have found this article a few days ago, it might be the closest solution in your case: http://sviluppomobile.blogspot.ru/2013/03/how-to-debug-windows-phone-html5-apps.html – Mike Mar 31 '13 at 20:33

4 Answers4

10

Windows Phone 7.5+ (IE9) and 8 (IE10) doesn't have a debug console but it's possible to add it to your web app via JSConsole by Remy Sharp.

Setting up a remote debugging session is straight forward enough. Visit jsconsole.com, get a unique session ID, add the session ID and JS snippet to your web app and you're good to go. More detailed setup instructions and video can be found on the website.

And although the JSConsole instructions doesn't explicitly mention Windows Phone support, a number of websites have confirmed it works.

Other tools, which may also be of use, are mentioned on a previous Stackoverflow question.

UPDATE: Internet Explorer 11 (IE11) introduces a new emulation tool which allows local (assuming you're running Windows 8.1) testing and debugging of websites for Windows Phone.

Community
  • 1
  • 1
Neil Turner
  • 2,712
  • 2
  • 18
  • 37
  • 1
    Are you sure there is no such console on Windows Phone? Feels like such a basic function... – Oskar Mar 13 '13 at 16:50
  • 1
    Yes, I checked on both the WP8 emulator and real WP8 device. And although iOS and Android have remote debugging, the feature is quite new (only since iOS 6, I think). We might see a remote debugging feature for IE on WP8 in the future - the WP team have publicly stated that they ran out of time when it came to certain WP8 features. Let's hope they appear in an update due later in the year! – Neil Turner Mar 13 '13 at 17:08
  • iOS always had their debug console on the phone and I think Android always have had it as well. I am looking for a way to debug the website on the phone. Remote debugging will not help me if I want to know what has happened on the users phone, as long as their devices are not on remote debugging or I have a log on their sessions. – Oskar Mar 14 '13 at 14:27
  • 1
    I mentioned a few other tools (linked via a previous answer), have you tried [http://sgrebnov.github.com/IeMobileDebugger/](IE Mobile Debugger)? it appears to have an in-app console. If this works for you, I can amend my answer. – Neil Turner Mar 14 '13 at 14:45
  • That is basicly Wienre and it is still a remote debugging tool. It is good, but what I am looking for is a debug console on the actual phone. But, it seems that I am asking for something that isn't there... :( – Oskar Mar 15 '13 at 07:03
  • Yes, unfortunately there is no built-in console in the current release of Windows Phone 8. Also, Microsoft is getting secretive about their updates so we have no idea what's coming in the next update. – Neil Turner Mar 15 '13 at 13:06
  • i cannot reproduce some bugs using the emulator. it is maybe one of the scariest emulators out there. – Guntram May 18 '16 at 10:56
2

I don't think so. But you can use IE10 and change the User Agent string to simulate you are IE10 in Windows Phone.

Edit

I think all JavaScript functions in the mobile are supported in Desktop. But if it is not a solution I'm afraid your only friend is this : Compact Inspector

Vitor Canova
  • 3,918
  • 5
  • 31
  • 55
  • 1
    Do you think all the javascript functions in the desktop version of IE10 is supported in the mobile version? – Oskar Mar 13 '13 at 07:29
  • When I use the phone I would like to know what is going on behind the scenes. A simulation wouldn't help me with that... – Oskar Mar 13 '13 at 08:12
2

My recommendation is to test the website against desktop IE10 with all JavaScript/DOM debugging support you got there - it's 99% similar to IE10 in Windows Phone 8. For additional testing on phone you can install the Windows Phone 8 SDK and launch the website on the emulator.
Edit: nice article How to debug Windows Phone HTML5 Apps using Node.js.

Martin Suchan
  • 10,600
  • 3
  • 36
  • 66
2

You can use [Weinre][1] with VS2012 / VS2013 phone emulators or an actual device. You have all the details here, very simple to set up nodeJS based solution.

http://sviluppomobile.blogspot.cz/2013/03/how-to-debug-windows-phone-html5-apps.html

DATEx2
  • 3,585
  • 1
  • 24
  • 26