!--a11y-->
Starting and Stopping Debugging Sessions 
Use
You use this procedure to start and stop sessions to debug HTML templates.
You can:
Prerequisites
You have set up your environment, as described in
HTMLBusiness Debugging.If you fail to do this, your debugging session will not work.

You can only debug sessions that are initiated by a Web browser that is running on the same machine as the SAP@Web Studio.
Procedure
Debugging New Sessions
A red disk (
) appears at the beginning of the line to indicate a breakpoint.
Setting and deleting breakpoints is a toggle operation. To delete the breakpoint you have set, hit F9, choose Toggle Breakpoint on the Debug toolbar or choose Debug ® Toggle Breakpoint.
You can also
You see the Select Server Session dialog, which displays a list of currently active sessions and their status.

There may be no currently active sessions.
The SAP@Web Studio posts a debugging request.
When you do this, the AGate server initiates an ITS session, binds the session to the pending debugging request and activates the breakpoints and watchpoints you have set.
When the session hits a breakpoint (whether set explicitly in the code or implicitly), the debugger displays the HTMLBusiness code at the line currently being executed and opens three
Debugging Active Sessions
To debug active sessions (that is, sessions that have not yet timed out), all you need to do is connect to the AGate server.
You see the Select Server Session dialog, which displays a list of sessions and their status. The handling of sessions depends on their status:
The dialog lists the source file name and current line number.
The dialog lists these sessions as
The dialog lists these session as
When a connection has been established, the debugger activates and watches for all the breakpoints and watchpoints you have set.
You can also set new breakpoints as described above for debugging new sessions or maintain breakpoints and watchpoints in the
If the session is currently executing the file (especially if it is stuck in an endless loop), you can interrupt the program execution and transfer control to the debugger. To do this, choose Break on the
toolbar or Debug ® Break.Stopping Debugging Sessions Explicitly
A debugging session terminates when the ITS session terminates, but you can also stop debugging sessions explicitly at any time.
To do this, choose Debug ® Finish Debugging.
The ITS monitors debugging sessions regularly. If they are left idle for a long time without any user action either on the Web browser side or the debugger side, the session times out and is terminated. When this happens, the SAP@Web Studio displays a warning message.