Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #39272
| Path | csiph.com!weretis.net!feeder8.news.weretis.net!news.mb-net.net!open-news-network.org!.POSTED.63.227.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch!not-for-mail |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Debug ipad |
| Supersedes | <7181920.EvYhyI6sBW@PointedEars.de> |
| Date | Tue, 15 Dec 2020 04:20:32 +0100 |
| Organization | PointedEars Software (PES) |
| Lines | 72 |
| Message-ID | <3568762.kQq0lBPeGt@PointedEars.de> (permalink) |
| References | <xMednVkmwbpTaUrCnZ2dnUU7-Y3NnZ2d@westnet.com.au> <XnsAC9474388E69eejj99@194.109.6.166> <D_KdnZq62_zMmUXCnZ2dnUU7-Y3NnZ2d@westnet.com.au> |
| Reply-To | Thomas 'PointedEars' Lahn <cljs@PointedEars.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | 8Bit |
| Injection-Info | gwaiyur.mb-net.net; posting-host="63.227.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch:178.197.227.63"; logging-data="3637"; mail-complaints-to="abuse@open-news-network.org" |
| User-Agent | KNode/4.14.10 |
| Cancel-Key | sha1:2QerDaY5CFOVIo3NDoSwPIDhXBo= |
| Cancel-Lock | sha1:qfcF/OT1kerJmPtjmSyxYIYYRfM= |
| Face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== |
| X-User-ID | U2FsdGVkX18+6OJtghlCbJEvbWubfsxZS88P9DCxq9B3qBZ9E5OTQg== |
| X-Face | %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v |
| Xref | csiph.com comp.lang.javascript:39272 |
Show key headers only | View raw
Andrew Poulos wrote:
> On 15/12/2020 10:42 am, Evertjan. wrote:
>> Andrew Poulos <ap_prog@hotmail.com> wrote on 15 Dec 2020 in
>> comp.lang.javascript:
>>> I don't own a Mac and I've been shown bugs, in a website we built, that
>>> only seem to happen on an ipad. I been given possession of the ipad and
>>> can reproduce the errors but I don't know how to debug them.
>> Wouldn't that be browser-dependent, rather than device or o.s. dependent?
>
> Yes, that's what I was expecting but there are bugs that only happen
> when the site is viewed on an ipad.
"ipad" is not a browser. Find out with which browser the problem occurs,
then you can be advised better.
>>> I added some code that will alert when an JavaScript error is triggered
>>> but on the ipad it fails silently.
>>
>> What does that mean 'an JavaScript error is triggered'?
>>
>> Can you write code for that? I doubt that, please show relevant code.
>
> I use this to display errors:
>
> window.onerror = function (msg, url, lineNo, columnNo, error) {
> let message = [
> 'Message: ' + msg,
> 'URL: ' + url,
> 'Line: ' + lineNo,
> 'Column: ' + columnNo,
> 'Error object: ' + JSON.stringify(error)
> ].join(' - ');
>
> window.alert(message);
> };
If window.error works in that case, probably window.alert(…) is disabled in
the “error” event listener as it is not triggered by a user interaction.
In that case you can instead
- send the error message to your server via XHR/Fetch;
- append the error message to the Web site
· for users to copy it
· for users to send it to you in an e-mail; use something like
window.location = 'mailto:your.email@address.example'
+ ?subject=error'
+ '&body=' + encodeURIComponent(errorMessage);
in the event listener of a widget that you generate then.
Otherwise you could wrap your entire code in
try
{
/* … */
}
catch (e)
{
/* or similar */
window.alert('…')
}
but probably only for debugging purposes (you could give the user a debug
link with a token that must match for this to happen, so as to not
compromise your app or your server).
--
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Debug ipad Andrew Poulos <ap_prog@hotmail.com> - 2020-12-15 10:27 +1100
Re: Debug ipad "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-12-15 00:42 +0100
Re: Debug ipad Andrew Poulos <ap_prog@hotmail.com> - 2020-12-15 11:33 +1100
Re: Debug ipad Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-12-15 04:20 +0100
Re: Debug ipad Andrew Poulos <ap_prog@hotmail.com> - 2020-12-15 14:56 +1100
Re: Debug ipad Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-12-15 13:29 +0100
Re: Debug ipad Andrew Poulos <ap_prog@hotmail.com> - 2020-12-16 10:45 +1100
Re: Debug ipad Andrew Poulos <ap_prog@hotmail.com> - 2020-12-16 11:14 +1100
Re: Debug ipad Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-12-15 03:48 +0100
Re: Debug ipad Arno Welzel <usenet@arnowelzel.de> - 2020-12-19 13:09 +0100
csiph-web