[英]How do I find javascript syntax errors in my PhoneGap app?
I have a PhoneGap app that just won't execute my javascript code. 我有一个PhoneGap应用程序,只是不会执行我的JavaScript代码。 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. Weinre
只能告诉我找不到我创建的对象和/或属性。
I've deployed the source code on an apache server and it loads and executes in a desktop/mobile web browser without error. 我已经将源代码部署在apache服务器上,并且可以在台式机/移动网络浏览器中正确地加载和执行源代码。 There must be a difference in javascript parsers or something. javascript解析器或其他内容必须有所不同。 How can I debug this? 我该如何调试?
Found the problem: I was using the newer ES6 let
keyword to set a variable. 发现了问题:我正在使用更新的ES6 let
关键字来设置变量。 Whatever browser PhoneGap embeds doesn't support it yet. 不管哪种浏览器嵌入的PhoneGap都不支持它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.