API Engine local Debugging - how to? (no documentation yet)

Hey there,

with version 3.0.0-v16 Standalone now works with custom code.
However, i was not able to debug a hosted api service. (Event Handlers do work)

So, how to debug my custom services?

Documentation is currently: “”
:*-(

https://backendless.com/documentation/api-engine/apieng_service_debugging.htm

Hi, Jens!

Documentation would be ready soon, for now here is a quick example of using this feature.

  1. Put code of you hosted service in custom code project and compile it
  2. Start coderunner in debug mode with ./CodeRunner.sh
  3. Make sure that your service is found - in start logs you’re able to see row [INFO] Build successfully: EventModel{timers=x, eventHandlers=y, services=1}
  4. Add new remote debug run configuration with settings: host - localhost and port - 5005 ( in IDEA you can find this option in “Edit configurations” -> “add new” -> “Remote” )
  5. Start app with created configuration
    That’s it, now the debugger is attached to local coderunner process and you should be able to debug your code.
    best regards,
    Alex

I’m sorry, there is an issue with hosted services debugging for now. We’re working on it now and it will be available on the next week.

I’ve got a compiled hosted api service.

Took the code + inserted it into codeRunner.

Running CodeRunner.sh returns:

[INFO] Runner successfully registered
[INFO] Parsing event model...
[INFO] Build successfully: EventModel{timers=0, eventHandlers=0}
[WARN] There are no any code, which can be deployed to Backendless...

Somehow my custom service is not recognized? There’s also missing the number of “services”
If I upload the generated jar it works fine using swagger.

Jens,

Service debugging is not available yet, we plan to release an updated code runner in the next few weeks. The doc will be updated at that time as well.

Regards,
Mark

May I suggest an alternative for this ?

If anybody needs to debug one service, how about getting the Service SDK for java, and instead of using “Backendless.CustomService.invoke” method, just call “<your service>.<your method>” with proper parameters.

At least you can check if your own code works without re-uploading your code every time.