Debugging a PolicyCenter server using a socket connection

About this task

Use a socket connection to connect Studio to a PolicyCenter server running either on the same computer or a remote computer. If running on the same computer, however, a shared memory connection is faster than a socket connection.

You must manually start the server in the proper debug mode, and create the proper debug configuration in Studio.

Procedure

  1. Start the PolicyCenter server.
    1. Start the server using the following command:

      gwb runServer --debug-socket --no-suspend

    2. Towards the beginning of the server console message output, look for the label debug-socket:, and then the text that is similar to the following:

      Listening for transport dt_socket at address: portNumber

    3. Make a note of the value provided for portNumber.
  2. Create the debug configuration in Studio.
    1. In Studio, click Run > Edit Configurations.
    2. In the Run/Debug Configurations dialog, click Add New Configuration , and then click Remote.
    3. In the Name text box, type a name for the debug configuration. For example, server-socket.
    4. Next to Transport, click Socket.
    5. Next to Debugger mode, click Attach.
    6. In the Host text box, type the hostname of the computer on which the PolicyCenter server is running.
    7. In the Port text box, type the portNumber that you noted when you started the server.
    8. Click OK.
  3. Connect the Studio debugger to the PolicyCenter server using the shared memory connection.
    1. In Studio, in the Select Run/Debug Configuration drop-down list, select the debug configuration that you created.
    2. Click Run > Debug ‘configName, where configName is the name of the debug configuration that you created.

Results

The debugger connects to the PolicyCenter server, and debug messages appear in the Debug tool window in Studio.