iPad Javascript Debugging - javascript

We have a huge client-side application that doesn't work at all on an iPad and we have no idea why.
Unfortunately I don't have a book way of showing or explaining a particular piece of Javascript that doesn't work because from what we call tell, there are none.
Can any heavy Javascript users give me some clues how we can troubleshoot this?
PS - We are a Windows shop, but I would be willing to go buy a MacBook Pro to troubleshoot if need be, but I'd obviously prefer to save the 2 grand if I can.

I don't use Windows, but I assume you could use virtualization software to run OSX on a PC and then use the Safari remote web inspector:
https://developer.apple.com/safari/tools/
It looks like there are also two tools available if that doesn't work:
https://people.apache.org/~pmuellr/weinre/docs/latest/Home.html
http://www.telerik.com/platform#test

Related

Barcode Scanning Via Mobile Browser?

I am looking at trying to scan barcodes from a mobile device.
I been doing some research and I having hard time finding JavaScript libraries that can do this.
I see these projects
zxing
This seems to be no longer in development and just bugs fixes are done?
QuaggaJS
This one, I am not sure if it is development either anymore as changelog is from 2017
quagga2
This seems to be a fork of the one above? So this might be the better choice to go with vs the 2?
What I am trying to achieve is this. I want to go on an andriod device (think phone, maybe tablet), load up chrome or firefox, go to my site click a button and load up the devices camera and scan a bar code (mostly EAN-8/13).
I want to do the same thing on apple devices (iphone and ipad), load up safari (not sure if they got chrome and Firefox on these devices. I don't own apple), click a button and load up their devices cameras and scan a bar code.
I think this is possible in all the libraries I listed above, but I am still unclear if this is possible on apple devices? I read somewhere that before ios 14 it would not be possible?
I am open to other libaries, I can use Jquery, vanilla javascript and I think angular (but I think it is version 3).
Just been doing this same research myself. All of those open source ones you listed seem to be either dead or have performance/reliability issues. Looks like only the commercial versions are really viable at the moment:
Dynamsoft - https://www.dynamsoft.com/store/dynamsoft-barcode-reader/
Scanbot - https://scanbot.io/products/barcode-software/web-barcode-scanner/
There are also two different mobile apps that are viable. These are web apps that just display a browser view and make a barcode scanning function from the app itself available on the page:
https://berrywing.com/scan-to-web-app/
https://www.mochasoft.dk/iphone_barcode2.htm
The second one has a more capable JS API of the two.
UPDATE: I went with that last option from Mochasoft. Turned out quite well.

Debugging css and javascript on different devices

When I resize my browser on my mac, on any resolution it looks well, but when I'm on a older tablet of mine, the website looks so messed up.
What is the best way to capture that device info? So I can replicate on my machine? I still don't know is it a javascript or a css issue. How is this usually done?
Edit:
By the info I got so far, there is no tool that you can install on your device. Which would act as some kind of console where you could see, debug and interact errors like a js resource didn't load, unknown css property or any other error that you're able to see as a web developer in a chrome console for instance
Answering the question from some of the comments, so it's more visible to other people having the same issue :
You should be able to use remote debugging. You will need to use Safari on the desktop. I am not sure if you are restricted to Mac however... moduscreate.com/enable-remote-web-inspector-in-ios-6 The same also exists for Chrome/Android devices and developer.telerik.com/featured/… – xxcezz
Try modern.ie/en-us/tools not sure if it's useful. http://caniuse.com .
my best guess that would be iPad 1, running IOS 4/5. http://webdesign.tutsplus.com/articles/quick-tip-using-web-inspector-to-debug-mobile-safari--webdesign-8787

How to debug web app on windows mobile (7 and later) [duplicate]

I'm not a Windows Phone developer, and I want as little to do as possible with anything related to Microsoft. Nonetheless, I need to get my mobile web app running properly on Windows Phone 7. What debugging tools are available for the platform? Something like the Webkit developer tools or Firebug would be ideal, either from the phone itself or more likely, remotely debugging from my computer.
If such a thing doesn't exist, I'd settle for being able to read Javascript error messages, and view the contents of variables using alert() or similar. At this point, all I know is that my JS is failing: I don't know where or why, let alone how to fix it.
My dev computer is running OS X, and I'd really like to be able to use these tools from OS X if possible. Assuming that debugging tools exist (which I really hope they do) are they designed for Windows only? If so, does anyone know how well they would work with Wine or similar?
EDIT: I have a physical Windows Phone 7 device, so I can use that. However, alert() doesn't seem to be working, which is why I'm posting this question. Does alert() normally work on the WP7 browser?
You'll likely find the Mobile Perf Bookmarklet to be the easiest all-in-one tool for testing any mobile device.
Works well on the iPhone/iPad/Samsung Galaxy Tab in my testing so far.
Quote:
It displays a menu with links that load other bookmarklets including Firebug Lite, Page Resources, DOM Monster, SpriteMe, CSSess, and Zoompf.
Unless you have a Windows Phone 7 device, you will need to run Windows in BootCamp and install the Windows Phone Developer Tools in order to test in IE on the emulator. I don't know about Whine, but I ran into major problems trying to test in Parallels - so based on my experience, I suggest keeping it as simple as possible.
There is no console in IE on the phone, so you will need to use alert, like you suggested, or just write text to a div on your page as a custom console.
If you really want to code in OS X (which I definitely understand), using a separate machine for testing IE in the WP7 emulator is going to be your best bet.
EDIT: I just tested alert and it did work fine on my Windows Phone. My guess is that a syntax error is preventing it from calling.
The following may be interesting
Simple IE debug tool for Windows Phone
Supports
Html traversing
Html node styles, properties, metrics
Reading console output
Executing js on device side from console (including intellisense)
Dynamic script injection - ability to debug live sites
Not supported
js breakpoints
Just wanted to add a note to say that full JavaScript debugging is possible now with Windows Phone 8.1 and Visual Studio 2013 Update 2. Full details are available at:
http://blogs.msdn.com/b/visualstudioalm/archive/2014/04/04/diagnosing-mobile-website-issues-on-windows-phone-8-1-with-visual-studio.aspx
I realize that this doesn't help the versions referenced in the original question (WP7), but I'm hoping this will help people who may find this question and are running a more recent version.
Something that has worked for me, is to test my mobile pages through the Windows Vista built-in Internet Explorer browser.
It comes with a script debugger ( which you have to enable in Advanced Options tab through the Internet Options menu ), and it seems that it gets really close to the Internet Explorer Mobile implementation.
Another tip would be, that, instead of using window.alerts, you can also use document.write or set output to a div content.
I'm using this hack to have console.log send info back to the server (it uses window.fetch, which I'm polyfilling, but could use xhr instead) https://gist.github.com/wheresrhys/bf93057ee3a594454582

Blackberry OS5+ webworks application is terribly slow

Iam developing a blackberry webworks application which is supposed to work on OS 5.0 and upwards.The app does use a fair bit of jquerymobile. The HTML's had already been developed and it was working well in the ripple emulator. But when I deployed it in an OS5.0 device, the load times were terrible. It took nearly a minute to load a page with some 3 images and a couple of tables (nothing was fetched from the server , all files were in the packaged application in the device). I even tried the pages on the native browser directly and its rendering capabilities were poor (css / jquery mobile etc came out horribly. Javascript was enabled in the device).
What I would like to know is, is native application/very basic html only way to get a decent experience on OS5.0? Is using fair bit of a javascript even feasible on OS5.0 HTML apps?
I even tried using a browserfield2 with caching but that too didnt make much difference.
Just wanted to see if things are indeed this bad in OS5.0 or if I missed something out. Any help/feedback will be greatly appreciated..

GUI Tool to test javascript

I am looking for GUI/Windows based tool to test my javascript code there instead of using firebug or other in-browser tool.
I want to play around with javascript language outside of the browser to learn more about it.
Has anyone come across such tool? I could not find one :(
Edit: I am looking for GUI/Windows based on which can be used even if I am not connected to internet and still play around with javascript.
I'm a big fan of jsFiddle.
jsBin is another option.
Microsoft Web Developer Express is free and has a great JavaScript editor and debugger.
If you're looking for something that you don't need to be connected to the internet for, why can't you just use your browser? I assume you've already got some kind of development platform now. Save to a local HTML file and view it on your local browser.
Do you not have some kind of a GUI development program like DreamWeaver or CODA or something like that? (I'm on a mac, so I'm not familiar with a lot of windows based programs).

Categories

Resources