如何在PhoneGap应用程序中找到javascript语法错误?

时间:2022-04-20 15:22:54

I have a PhoneGap app that just won't execute my javascript code. All I know is that it's a syntax error. Weinre can only tell me that it can't find the objects and/or properties I've created.

我有一个PhoneGap应用程序,它不会执行我的javascript代码。我所知道的是这是一个语法错误。 Weinre只能告诉我它找不到我创建的对象和/或属性。

I've deployed the source code on an apache server and it loads and executes in a desktop/mobile web browser without error. There must be a difference in javascript parsers or something. How can I debug this?

我已经在apache服务器上部署了源代码,它在桌面/移动Web浏览器中加载和执行,没有错误。 javascript解析器或其他东西必须有区别。我该怎么调试呢?

1 个解决方案

#1


0  

Found the problem: I was using the newer ES6 let keyword to set a variable. Whatever browser PhoneGap embeds doesn't support it yet.

发现问题:我使用较新的ES6 let关键字来设置变量。无论什么浏览器PhoneGap嵌入都不支持它。

#1


0  

Found the problem: I was using the newer ES6 let keyword to set a variable. Whatever browser PhoneGap embeds doesn't support it yet.

发现问题:我使用较新的ES6 let关键字来设置变量。无论什么浏览器PhoneGap嵌入都不支持它。