This is a migrated thread and some comments may be shown as answers.

Checking Debug vs. Release

1 Answer 50 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jmillar
Top achievements
Rank 1
jmillar asked on 27 Nov 2015, 05:33 PM

Hi all;

Can someone tell me a quick way to determine if my code is running in debug or release mode?  What I'm really trying to do is use one set of data connectors in dev, and another in production.

Thanks,

Jason

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 02 Dec 2015, 09:17 AM
Hi Jason,

In order to implement your logic in Telerik Platform you can use configuration-specific files. When you run a build, AppBuilder takes the file that matches the currently set build configuration and includes it in your application package. For example, when you run a build with the Debug configuration, AppBuilder takes index.debug.html and includes it in your application package as index.html.

You can find more information on the configuration-specific files implementation here. In your case you can create a [dataConnectors].debug.js file using your data connectors for the dev environment and [dataConnectors].release.js for the production environment.

Give this a try and let me know if it helps.

Regards,
Tina Stancheva
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
General Discussion
Asked by
jmillar
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or