Related Topics:
The Enterprise Server Dynamic Debugging option enables you to attach to, and debug, any application or service running on a local, or a remote, enterprise server. It requires no changes to the code of your program. It does however require that you turn on Dynamic Debugging for your enterprise server, that you compile for debug and that you deploy the dictionary (.idy) files for your application.
When you start a debug session for a project that uses an enterprise server configured for Dynamic Debugging, you can tell the server that you want to debug any service or application instance that matches criteria that you supply. For example, you can specify that you want to debug instances of a given web service that are started from a particular client machine.
Each time an application or service is started the enterprise server checks to see if it matches the criteria that you supplied. If it does, the enterprise server attaches it to your debug session. You can then step through the application in the normal way.
Your match criteria can be specific or general. However, we recommend that you be as specific as possible to avoid conflicts with other users. If more than one user specifies details that match a particular service or application instance, the most specific match (that is, the session that provided the most specific information) will be attached to the instance.
Example USERA specifies Web Services started from a particular client IP address USERB specifies Web Services started from the same client IP address, but also specifies the service name. When a matching web service is started, the enterprise server will attach USERB's debug session to the service.
When you specify the match criteria, you will be warned if they are similar to those provided by another user. If you specify identical match criteria to those provided by another user, you will receive an error message and the criteria will be rejected.
Note: You can view the active dynamic debug sessions and the associated debug criteria on your enterprise server by using the Dyn-Dbg button in ESMAC. You can also use the screen to remove debug criteria that are no longer required. To access ESMAC, see To start ESMAC for a server.
The process of dynamic debugging is very similar for all types of deployed applications.
You can deploy service interfaces by using the Deploy tool.
To deploy a service interface using the Deploy tool
For guidance on deploying CICS and JCL, please see the chapter CICS Walkthrough in your Mainframe Transaction Option Developer's Guide, and the chapter JCL Walkthrough also in your Mainframe Transaction Option Developer's Guide.
Note: Please make sure to include the .idy files for the program in the set of files that you deploy.
You can set the environment variables in the Project Properties dialog.
For a Web Service, you can enter any combination of the following:
For J2EE, enter the fully qualified name of the service.
For CICS, you can enter any combination of the following:
Note: For non-facility tasks (i.e. those which are not running on a terminal or printer) specify '....' for the value of the terminal ID.
For JCL, you can enter any combination of the following:
Net Express now passes the details that you entered to the enterprise server and waits for the service to start.
Each time a service or application is started, the enterprise server will check to see if it matches the details that you provided. If it does, the enterprise server attaches the Net Express debugger to it.
For example:
Note: You cannot run the client module from within your debug session. However, if the client program is part of a different project to the one that you are using for debugging, you can start another Net Express session, open the client project and run the client module.
The IDE debugger now waits for the next matching service or application to start.
Related Topics:
You cannot set breakpoints prior to the time that the relevant program is loaded into your debugging session. In this context, the session starts when you start animating and ends when you close the project. As a consequence of this, you cannot save breakpoints or monitors between sessions. However, you can repeatedly debug the application or service during the debug session.
When you deploy your application to the enterprise server you must include the .idy files along with all the other files required by the application. The .idy files are created during the first stage of compilation and contain information required for debugging.
The source files and the .idy files for the application must be available to the debugger.
You may find, when you are debugging a Web service, that the client returns error 0015. This is a time-out, and is caused by the service not returning to the client in the expected time, because you were debugging it. If you find this a problem, you can change the time-out interval - edit the file mfclient.dat in Net Express\Base\bin and insert:
[default]
timeout=nn
where nn is the desired timeout period in seconds (at run time the figure is rounded up to a multiple of 5).
If your enterprise server is running on the same machine as your debugger, you can use the following alternative methods for debugging.
To use a debug service execution process for Enterprise Server debugging
To use this technique, the debugger and the process being debugged must be in the same security context. Also, note that you cannot use this technique on Windows Vista or later or with some earlier releases of Windows.
To use CBL_DEBUGBREAK for debugging with Enterprise Server running under your user ID
Note: For examples of debugging methods for CICS applications, see the chapter of your Mainframe Transaction Option Developer's Guide.
For JCL applications, you can also start a debug SEP/initiator by using the ESMAC interface. For more information, see To use a debug service execution process for Enterprise Server debugging.
As an alternative to inserting the CBL_DEBUGBREAK command into the code of your program, you can compile it with the compiler directive INITCALL"CBL_DEBUGBREAK".
Related Topics: