Start Debugging
Running debug forms and programs that uses screen input/output (Start Web Client)
Before forms and programs can be debugged a connection to the correct transaction server has to be created and the path to the correct Application Center to use has to be set, see Setting up the Debugger.
There are three options to start debugging a form and/or program that uses screen input/output. All three require that the debugger has been started and a connection has been made to the correct transaction server.
Click in the debugger on the menu Run and then Start Web Client, or click in the debugger on the toolbar icon Start Web Client. The last method is to start the Application Center with the following suffix: ?Debug=true (e.g. "http://localhost/AMT/ApplicationCenter/?Debug=true" ).
Note: the "Start Screens" option in the Run menu is not used by AMT for COBOL applications.
When running a form or program that has been generated for debugging, the additional debug functionality that is presented in the debugger depends on which part is currently being handled. A full listing of the additional debug functionality is available on the page: Debugger Commands.
Please note that there is a decrease in performance when running a form or program in debug mode. This is because every instruction in a debug program is sent separately to the Transaction server which returns a separate reply. When running a form or program normally, the whole screen is sent to the Transaction server at once. The Transaction server then performs the instructions and sends the result back to the web client. So, when running a debug form there is more interaction between the Application Center and the Transaction server, which causes the performance loss.
When debugging with the web client, normally the debug session is closed by closing the web client. However if the startup code is being debugged the close down trigger will not reach the server correctly. In that case the debug session can only be closed manually using the 'Debug sessions' screen (see below).
The debugger can only debug one form or program at the same time. |
Running debug batch programs (Start Program)
A debug program without screen input/output (batch program/report) can be started via the debugger using the menu Run and then 'Start Program' option or the Start Program icon on the toolbar. After having debugged a program, the same program can be debugged again by selecting the 'Restart Program' option. In the same way as for programs with screen input/output, additional debug functionality is presented when debugging a batch program. A full listing of the additional debug functionality is available on the page: Debugger Commands.

ComScript Debug Jobs
It is also possible to debug a Program started by a Comscript script in the AMT Debugger.
- Generate the AMT Object with the Private Debug option enabled.
- Set the Debug property of the Job Object to True in the ComScript script.
For example in PowerShell:$Job.Debug = $true - Run the Comscript script.
- Open the AMT Debugger and connect to the BatchController service.
- Open the job and select Start Program. The following window appears:
- In the tab Program request waiting for debugger, select the Job started by the ComScript script from the list and select the Debug button to begin debugging.
Debug sessions
Debug sessions can be detached, (re)attached, aborted or killed with the "Debug Sessions" button on the toolbar or the same option in the run menu.
In past AMT-COBOL versions, old debug sessions that are still active were automatically reconnected, this is no longer the case. Debug sessions can now manually be re-attached, aborted (close the session) or "killed" (forcefully end the debug session, this may keep the resources locked) using this screen.
It is also possible to detach your current session in order to start debugging a different item. When programs are detached, they will continue to run normally if there is no userinput needed and close the session at the end of their run, causing the session to disappear from the list.