How to debug extensions in Java Platform?

How to debug extensions in Java Platform?

  
How to debug extensions in Java platform? I saw similar question has answers for .Net platform. But hoping to find answers for Java.

Thanks in Advance
Jeyanthi Gopalan wrote:
How to debug extensions in Java platform? I saw similar question has answers for .Net platform. But hoping to find answers for Java.

Thanks in Advance
Hello Jeyanthi,

One approach that you can take is to use the logging system. As described in this post by this answer.

The code for logging in java that you can use is this:
 
outsystems.hubedition.runtimeplatform.log.GeneralLog log = new outsystems.hubedition.runtimeplatform.log.GeneralLog();
log.write( new DateTime(), AppInfo.getAppInfo().getOsContext().getSession().getSessionID(), AppInfo.getAppInfo().geteSpaceId(), AppInfo.getAppInfo().getTenant().getId(), AppInfo.getAppInfo().getOsContext().getSession().getUserId(), e.getMessage(), "Warning", "ModuleName", "0");

Let us know if you need more help.

Cheers,
Miguel

Doesn't Java have a remote debugging system? .NET does and can be used to debug extensions running on a remote server...

If not, I guess you'll have to go with the logs, but that's pretty bad. Also, if you're doing this, put Audits before and after calling the extension method. Sometimes it's just the parameters passed to the method that are wrong, and there's no need to actually debug the extension.