PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, September 12, 2022

[FIXED] How to know at runtime whether a Kony app was built in debug or release mode

 September 12, 2022     cross-platform, debugging, temenos-quantum     No comments   

Issue

I'd like to be able to determine programmatically whether the app was built in debug or release mode. I'd like to be able to write something like:

if(isDebug) {
    //do domething.
}
else {
    //do something else.
}

Solution

After using the Chrome debugger I was able to unearth the solution. There's a constant set during the build process which you can query in order to determine whether the app has been built in debug or release mode.

if(kony.constants.RUNMODE === "debug" || appConfig.isDebug) {
    //do domething.
}
else {
    //do something else.
}


Answered By - Mig82
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing