Hi Ameer,
There are several ways to get to the console log and even debug the JavaScript in the engine, recommended is to use the debugging framework.
When working from the workbench:
When you are not working from the workbench but instead want to debug on an engine running a deployed package, you will need to configure the engine to open up a port for debugging.
As debugging is a significant configuration that needs to be set on the start of the engine, this cannot be done through the deployment.properties in the hub.
The following can be added to the INI file of the engine (LegaSuite.ini) to enable the debugging framework of the engine.
JavaScriptInspectEnable=1
JavaScriptInspectPort=9229
JavaScriptInspectAddress=0.0.0.0
An engine restart will be required:
Also, we do not recommend using this in production systems, but only on development and/or test systems, for security reasons.
After restarting the engine with these settings, you can add the engine address in your chrome://inspect connection configuration.
Sometimes named addresses can be used, but these will not always work, sometimes an IP address will do the trick.
And once configured, sessions running JavaScript should be visible in the dialog. Clicking the 'inspect' link will open the DevTools:
Note that firewalls must be configured to pass trough the information for port 9229 when debugging on a remote machine.
Another option is to scan the engine logs for javascript.console messages (level INFO):
For instance, this is a log message that may appear from engine side JavaScript:
2024-07-25 09:47:31,987 [8868] <{EID, Rocket_Development#1}{Session, I-1}> INFO javascript.console - script.global.gScriptType.functionKeysLoad=1, script.global.gScriptType.optionsSelect=0
Using the engine logs will not require to set up the debugging framework.
With the default log settings we provide in the products, these messages should be shown.
The log configuration can be altered to hide them (or make them visible if currently hidden).
Hope this helps,
Regards,
Roger van Valen.