About Business Logic Debugging¶
Backendless custom business logic can be debugged locally on the developer's computer while it is plugged into the Backendless Cloud service. This means your business logic code can be invoked through the API accessible via Backendless Cloud while the custom code runs on your computer. To develop and debug custom business logic developers must use CodeRunner™ SDK.
Important
If you develop API services, make sure to follow the instructions from the Project Setup section . If you develop API event handlers and/or timers and used the Business Logic code generation built into Backendless console, CodeRunner™ project configuration files are already included into the generated ZIP file.
To install and run CodeRunner™, open a command prompt window and change the current directory to the root directory of your project (the directory containing the coderunner.json
and package.json
files)
Run the following command to download and install CodeRunner™:
npm install
Run the following command to start CodeRunner™ in the local debug mode:
npm run debug
Once coderunner starts, it produces the following output:
your-comp-name:bin username$ npm run debug
> PROJECTNAME@1.0.0 debug /path-to-your-project
> coderunner debug
2016-03-23T13:12:51.136Z - CodeRunner(tm) Backendless Debugging Utility
2016-03-23T13:12:51.139Z - Copyright(C) 2017 Backendless Corp. All rights reserved.
2016-03-23T13:12:51.139Z - Version 1.2.1
2016-03-23T13:12:51.367Z - Starting Debug Code Runner...
2016-03-23T13:12:51.393Z - Building Model..
2016-03-23T13:12:51.397Z - Model Build completed: event handlers: 2, timers: 0, custom types: 1, services: 0, errors: 0
2016-03-23T13:12:51.399Z - Registering Code Runner on https://api.backendless.com
2016-03-23T13:12:51.777Z - Runner successfully registered.
2016-03-23T13:12:51.777Z - Registering Model on https://api.backendless.com
2016-03-23T13:12:51.950Z - Model successfully registered
2016-03-23T13:12:51.950Z - Waiting for Server Code tasks..