IOS devices (iPods, iPads, iPhones) have no JavaScript debugger



  • iOS devices (iPods, iPads, iPhones) have no JavaScript debugger and no way of enabling remote debugging.

    If this was a brand-new thing, like if it had come out last year, I'd be like: "oh, ok. Apple just hasn't gotten around to finishing the debugger yet, I'm sure it'll be around soon." But no. iPhones have been around for almost 5 years now.

    Hell, the original iPhone concept is that you wouldn't need "apps" because you could just write your software using HTML+JavaScript. That's great, Apple, but how the holy shit are we supposed to do that without a JavaScript debugger!?

    Sorry there's no images or anything; we just got a client who wants to see our product run on iPads, and I was like, "sure, it's written in standards compliant JavaScript and should work fine in any browser." Turns out: nope. Also turns out: Safari runs it fine, so whatever the bug it only happens in iOS devices. So no, using Safari to debug is not useful. If you were about to suggest that. It pissed me off, so here's the post.

    I talked to a friend of mine who works at Apple, and he said, "send me the code, and I can give it to some WebKit people." Right. Because that's an acceptable solution. Idiots.



  • This implies that there's a good way to debug JavaScript on Windows.  My experience lately suggests otherwise.  (Specifically, when running JavaScript scripts without a HTML/browser context.)  If you know how to set it up, please see this question on StackOverflow and claim some reputation points.



  •  Consumer devices have no use for a javascript debugger, really.  That said some type of Safari-on-iOS emulator for a Mac desktop makes a ton of sense.



  • @Mason Wheeler said:

    This implies that there's a good way to debug JavaScript on Windows.

    No it doesn't, you're just fucking hijacking my thread for your own pet issue because you're too fucking cowardly to make your own.

    @Master Chief said:

    Consumer devices have no use for a javascript debugger, really. That said some type of Safari-on-iOS emulator for a Mac desktop makes a ton of sense.

    There's a "simulator", but the problem is:

    1) There's no Macs around here, and the client already balked when we charged them for the iPad. (Yes, I know, the Real WTF is that I work at a web company that doesn't have 57,000 Apple iDevices sitting all around.)

    2) The "simulator" probably wouldn't exhibit the bug, since desktop Safari also doesn't exhibit the bug. It's not an emulator-- it doesn't act the same as an actual iPad.

    3) Any software program that can be programmed needs a fucking debugger. Raise your fucking standards and stop putting up with shitty software. It's in-fucking-excusable for Apple to not offer a JavaScript debugger for iOS' Safari, even though I'm sure I'm going to get 57,000 idiotic replies to this topic telling me I'm wrong for 57,000 different idiotic reasons, all of which sum to: "because I don't give a shit."

    And just to stave off the next idiotic post, "herp derp how do you put a JS debugger on such a tiny screen derp derp derp," I'm not asking for a local debugger, I'm asking for any debugger.



  • @Master Chief said:

     Consumer devices have no use for a javascript debugger, really.

    wat

    Are you perhaps saying that they're unnecessary due to emulators? EDIT: which apparently don't exist for iOS mobile devices?

    @blakeyrat said:

    I'm not asking for a local debugger, I'm asking for any debugger.

    Zune devices have a remote debugger through VS. It takes like 5 minutes to load the context after hitting a breakpoint but it's pretty nice. No reason for Apple to not provide one for their mobile version of Safari.



  • @blakeyrat said:

    iOS devices (iPods, iPads, iPhones)
    I found your problem.

    Am I the only one who thinks that our profession would benefit greatly if Apple were to suddely disappear off the face of the earth? In this day and age of PCs, Windows, Linux and Android do we really need these greedy assholes and their shitty vendor lock-in crap?

    The only thing I appreciate about Apple is the fact that they've chosen to have their phones automatically encode current GPS coordinates in the photographs they take so I can feak out their fanboys by "hacking" their location.



  • A hacky round-about way (but allows you to use the native Webkit debugger! :D) is this:

    http://atnan.com/blog/2011/11/17/enabling-remote-debugging-via-private-apis-in-mobile-safari/

    Works in iOS 5. I'm trying to see if it will work on the device.. but it's still exactly what is needed.



  • That states it only works on the simulator.

    Also, pretty much that exact technique is outlined here, but of course, again, it doesn't work on the actual iPad.



  • However, with the link I provided.. it would be able to be ran in the Simulator, which should behave identically (although much faster) than the device.


    The original post only indicates that he tried it out in normal Safari, which does use a different JS engine. Simulator MobileSafari should behave like device MobileSafari.

    Also, trying it on a device.. It should work in a custom webView that's programmed, so long as that method is called. I tried to get it to work on the device, but the version of GDB that I have on my JB iPhone doesn't seem to have the debug symbols that it needs.



  • Well I also don't have a Mac, so whatever.

    For all practical purpose, it doesn't goddamned exist.



  • Apparently Android is in much the same boat. Hence, this thread is excellent because (a) most of the people replying fail at basic comprehension skills (b) I now have a valid reason to tell my employers that I will not develop webapps for a portable device, and if they have a problem with that, they can write their own damn JS debugger for said device and get back to me.

    Seriously what is this shit? Who in their right mind would think it's acceptable to ship ANY browser without JS debugging support? Especially on a portable device where the JS implementation is almost guaranteed to be nonstandard and buggy?



  •  It's not perfect, but iOS does indeed have a Javascript debugger, I've used it before myself. It's basically on a par with the IE Javascript debugger though.

    Interestingly, if you Google for "ipad javascript debugger", the first result is to a question on StackOverflow, and the only answer is a link to a graphical guide on how to enable it. I'd say that the real WTF is the Blakeyrat doesn't know how to use a search engine.



  • @Master Chief said:

    Consumer devices have no use for a javascript debugger, really.

    No, but developers do.

    In the same way that most end-users have no use for Javascript debuggers in their browsers, Firebug/WebDev Toolbar etc are still pretty popular plugins (amongst the dev community).

    TL;DR: "there's an app for that..." "er, no there isn't."



    1. Sucky troll is sucky.
    2. That's an error console, not a debugger. If you think the two are the same thing, you evidently fall into the same camp as the creators of iOS and Android... which incidentally means you should die in a fire.


  • It is called a debugger, not an error console. I didn't say it was a good debugger (quite the opposite in-fact). I call you on your 'sucky troll' and raise you by one 'dumbass who cannot read troll'



  • @The_Assimilator said:

    2. That's an error console, not a debugger. If you think the two are the same thing, you evidently fall into the same camp as the creators of iOS and Android... which incidentally means you should die in a fire.

    Well.. luckily I know the difference between Firefox's "Error Console" and a plugin called Firebug - I can certaily say they're not the same thing.

    Or are you of the opinion that FireBug/web dev toolbar aren't "proper" debuggers? Although I use them for (rudimentary) debugging, I'll concede the point that they lack functionality found in more full-blown IDEs.



  • Nothing like some good old fashioned printf style debugging!



  • @boomzilla said:

    Nothing like some good old fashioned printf style debugging!
     

    You mean, there's another way?



  • There's many ways to write "Got Here (1)!" to the screen. Let your imagination run wild!



  • @blakeyrat said:

    2) The "simulator" probably wouldn't exhibit the bug, since desktop Safari also doesn't exhibit the bug. It's not an emulator-- it doesn't act the same as an actual iPad.
    Really? probably wouldn't. Really?

    I am trying to think of more to say, but really, you didn't try the simulator before complaining here? Really?


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.