Backendless supports the "remote-registration-local-debugging" model. This means that the service code can be debugged locally on the developer's computer while the service registration and its API endpoints become available through Backendless. API requests for a service in debug can be sent to Backendless and it routes them to the local debugging process running on the developer's computer. The diagram below illustrates the model:
To start a debugging session, run the following command from the project's root directory:
npm run debug
The command inspects the service code, registers it with Backendless for debugging and starts a local copy of CodeRunner™. Successful execution of the command must produce the following output:
15:15:10.417 - CodeRunner(tm) Backendless Debugging Utility
15:15:10.419 - Copyright(C) 2016 Backendless Corp. All rights reserved.
15:15:10.420 - Version 1.4.2
15:15:10.606 - Starting Debug Code Runner...
15:15:10.613 - Building Model..
15:15:11.485 - Model Build completed
15:15:11.486 - Custom Types (2):
15:15:11.486 - Order (app/models/order.js)
15:15:11.486 - ShoppingItem (app/models/shopping-item.js)
15:15:11.486 - Services (1):
15:15:11.486 - ShoppingCartService (app/services/shopping-cart-service.js)
15:15:11.652 - Registering Code Runner on https://api.backendless.com
15:15:12.103 - Runner successfully registered.
15:15:12.104 - Registering Model on https://api.backendless.com
15:15:12.282 - Model successfully registered
15:15:12.282 - Clearing Debug Services
15:15:12.449 - Registering Service ShoppingCartService for debug
15:15:12.668 - Service ShoppingCartService successfully registered
15:15:12.668 - Waiting for Server Code tasks..
The service in the debug mode will appear in Backendless console on the Business Logic > API Services screen. There is a label saying DEBUG which indicates the service is in the debug mode. You can use the API Inspector interface in Backendless console to perform service invocations and also download the generated client SDKs to test the service methods from a client application.