Expected behavior: The third gs.debug statement should print the value of the variable after substitution.Actual behavior: The following message is printed out.*** Script: [DEBUG] Sample message using substitution: org.mozilla.javascript.NativeJavaObject@7629855e

Workaround

The feature is working as expected as per currently supported functionality.

A possible option that could be used is to append the function call with an empty string similar to below example: