4

I am currently debugging my apps so they can run with the KBX extension. KBX extension runs the last deployed version so everytime I change some code in the appbuilder I need to redeploy to see the changes. Could the Kynetx team give us a modified KBX extension that uses the last saved version instead?

Loic Devaux
  • 316
  • 2
  • 9

2 Answers2

3

We do have plans to make the KBX more developer friendly, but in the meantime, there are a few tricks.

We recommend spending most of your development time testing with bookmarklets, as these give you greater control over when your actions fire, allowing easier inspection between the state of the page before and after your rules fire. Applications can be tested with bookmarklets with no change to the code, and are easy to use.

This does not help debugging in the rare case that your application behaves differently while running in the KBX, but it should get you past most troubles you are currently experiencing.

TelegramSam
  • 2,770
  • 1
  • 17
  • 22
  • My (modest) experience with KRL showed me that even though I develop an app testing only with bookmarklets I can still get some errors later in extension mode and other errors later in KBX extension mode. While the first problems are not too difficult to correct, the KBX extension is much tougher to debug/correct for me. See one problem encountered in this mode [here](http://stackoverflow.com/questions/5653090/kynetx-app-not-working-when-installed-via-kbx-extension-on-chrome). In the meantime some more documentation and a special KBX extension for debugging would help (me). – Loic Devaux Apr 16 '11 at 14:15
1

Here is a solution for Chrome and Firefox: a modified KBX extension that targets the latest version of apps: http://blog.lolo.asia/technology/kynetx/2011/04/16/debugging-with-kbx-extension-how-to-avoid-having-to-deploy-at-every-code-modification/

In short, I replaced :

KOBJ.add_config_and_run({‘rids’:response.apps});

with :

//patch run_latest_app_version_in_kbx
var run_latest_app_version_in_kbx= true;
var run_msg_json={‘rids’:response.apps};
if (run_latest_app_version_in_kbx===true){
    for (var i=0;i<response.apps.length;i++){
       run_msg_json[response.apps[i]+’:kynetx_app_version’]=’dev’;
    }
}
KOBJ.add_config_and_run(run_msg_json);
// 

in page_interaction/pages.js inside the Chrome extension and in resources/jid0-njkmo4quo4rc8p9kcuemahnyiku-kynetxforfirefox-data/page_interaction.js inside the Firefox extension

Loic Devaux
  • 316
  • 2
  • 9