
HTMLBusiness Debugging
Purpose
This process describes how to debug HTMLBusiness code in HTML templates.
Prerequisites
Before you can debug HTMLBusiness, you must:
To do this, create the registry value
HKEY_LOCAL_MACHINE\Software\SAP\its\2.0\<ITS instance>\
Programs\AGate\DebuggerEnabled
with data type
REG_DWORD and set the value to 1.If
DebuggerEnabled is set to 0 or is not defined (default), debugging is disabled for this particular AGate server. The ITS checks this value every five seconds, so you can enable or disable debugging dynamically without restarting.To debug HTML templates in load-balanced configurations where multiple AGate hosts are attached to a single ITS instance or in configurations where multiple AGate processes are controlled by the ITS Mapping Manager, you need to point the debugger to the appropriate AGate server using the
For example:
http://myServer:<port>/scripts/wgate/<service>/!?~agate_routing
To support debugging, the AGate server must be configured with at least 32 workthreads, as defined by the registry parameter
HKEY_LOCAL_MACHINE\Software\SAP\its\2.0\<ITS instance>\
Programs\AGate\MaxWorkThreads
You can display the value of
MaxWorkThreads in ITS Administration. If it is less than 32, increase it and restart the ITS. To initiate debugging sessions, there must also be at least eight free workthreads.These requirements are intended to prevent server lock during debugging sessions. If this happens, the server is unable to accept any more requests, even those requesting termination of debugging sessions. If the server is short of free workthreads or the maximum number of available workthreads is low, it rejects requests to start debugging sessions. You can override the rejection, but this is not recommended.
If you fail to take these steps as required, your debugging session will not work.

For security and performance reasons, you should not perform debugging in production systems, because this considerably impairs performance. Even if you enable debugging in a production system, execution of all HTMLBusiness code is approximately 10% slower, whether it is being debugged or not.
Process Flow
The main steps for debugging HTMLBusiness code are:
This includes displaying and editing the values of variables, array elements and more complex expressions.
Further support for these tasks is provided by
Result
A successfully debugged program.