调试Worklight应用程序的推荐方法是什么? [英] What are the recommended ways to debug Worklight applications?

查看:181
本文介绍了调试Worklight应用程序的推荐方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现我的应用程序的iOS部分特定的问题非常缓慢。我想知道在浏览器调试器不可用时调试Worklight应用程序的推荐方法。



特别是,我正在处理WL.JSONStore的问题这只适用于iOS和Android。我不能使用浏览器调试器来看看发生了什么。当我做WL.Logger.debug()语句时,Xcode控制台中没有显示任何内容,iPad模拟器控制台(Cordova)只显示几行。本周还有一段时间没有输出任何地方打印。



我已经下载并安装了Weinre,但没有一个打印语句显示在其控制台中一般来说,我只是看不到有关我需要的信息。



提前感谢您的建议。

解决方案

cnandreu在这里提供了很棒的提示。然而,可见性相当差,这些方法并没有真正解决我的问题。我也想建议我发现在我的项目中是最有用的(除了WL.Logger.debug()无处不在):




  • JSConsole不可或缺( http://jsconsole.com/ )。实际上,我实际上并没有像它的意图那样使用它。但是,我发现这是启动警告消息与WL.Logger.debug()(和console.log())一样,使语句实际打印到控制台,以便我可以看到我在做什么。 / p>


  • 在iOS 6中,Safari上的Safari可以检查连接的设备的DOM。这是适度有用的,特别是对于在iOS上本机运行时只是行为不便的混合UI问题。我不觉得超级有用,否则。请参阅 https://developer.apple .com / library / safari /#documentation / AppleApplications / Reference / SafariWebContent / DebuggingSafarioniPhoneContent / DebuggingSafarioniPhoneContent.html


  • 已经使用的一直是将状态消息写入UI。是的,这是一个丑陋的史前方法,但其他一切 - 包括80年代的错误打印语句到控制台 - 都失败了。这是我做的(使用Dojo和JavaScript):



    var v = dom.byId('audio_status');
    if(v){v.innerHTML + =recording file [+ filename +]; $ <$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $是显示调试内容的DIV的 ID



    这个东西很丑陋,但至少我们可以看到某些


    I'm finding it incredibly slow to fix issues that are specific to the iOS portion of my app. I'd like the know the recommended way to debug Worklight apps when the browser debugger isn't available.

    In particular, I'm working on issues with WL.JSONStore which only works on iOS and Android. I can't use the browser debugger to see what's going on. When I do WL.Logger.debug() statements, nothing is showing up in the Xcode console, and the iPad simulator console (Cordova) only displays a few lines. There have also been periods this week that no output is printed anywhere.

    I have downloaded and installed Weinre too, but none of the print statements appear to show up in its console and in general I just don't see information about the areas I need.

    Thanks in advance for your suggestions.

    解决方案

    cnandreu provides great tips here. Still, visibility is pretty poor and these approaches didn't really solve my problem. I would like to also suggest what I've found to be most useful in my project (aside from WL.Logger.debug() everywhere):

    • JSConsole has been indispensable (http://jsconsole.com/). In reality, I don't actually use it that much like it's intended. However, I've found that it's startup warning message does something with WL.Logger.debug() (and console.log()) that enables the statements to actually print to the console so I can see what I'm doing.

    • In iOS 6 Safari on the Mac lets you inspect the DOM of an attached device. It's moderately useful, especially for hybrid UI issues that only are misbehaving when running natively on iOS. I don't find it super helpful otherwise. See more at https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/DebuggingSafarioniPhoneContent/DebuggingSafarioniPhoneContent.html

    • The single most useful technique I've been using has been to write status messages to the UI. Yes, it's an ugly prehistoric way to do things, but everything else - including 80s error print statements to the console - have failed miserably. Here's what I do (using Dojo & JavaScript):

      var v = dom.byId('audio_status'); if (v) { v.innerHTML += "recording file ["+filename+"]"; }

    Where audio_status is the ID of a DIV that displays the debug content.

    This stuff is ugly, but at least we can see something.

    这篇关于调试Worklight应用程序的推荐方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆