This page is a first draft, which will be revised and improved. Please leave us a note on the community page regarding any issue.
Debug Mode
The best way to develop and test your application is by using debug mode.
Debug mode allows you to run local (or remote) copy of your application and bypass the process of installing and updating your application on Crossrider code server.This will allow you to update your local javascript file and test it immediately on your machine.
Note: when running in debug mode, only the 'debug app' will be executed (even if other applications are installed). Also, your debug application must be installed and enabled in order to run it in debug mode (this is important in order to be able to use its local cookies, Facebook API and other components which are available only upon installing an app).
To activate debug mode, please follow the instructions based on your browser and operating system in the left sidebar navigation.
Debug Functions
Part of the appAPI object there are two native functions to handle debug mode cases:
- isDebugMode() - this function returns true if you are running your app in debug mode. It's useful in cases you want to set specific testing for cookies, disable publish to Facebook, etc.
- debug(msg) - this function will show simple alert with the 'msg'. This will execute only if you are running in debug mode so when you deploy your application none of your users will see these messages.
appAPI.isDebugMode();
appAPI.debug("i'm a debug message");
Workers in Debug Mode
Some of the
Workers functions does not work in debug mode. If your application uses DOM and/or Background workers please read the 'debug' section on the Workers page.
Troubleshooting
Why my debug code isn't running?
- You will get error message when you specify file which does not exists or is not accessible - this should look like this:
