Attaching the flow debugger to an integration server for debugging

Before you can debug your message flow, you must attach the flow debugger to the integration server where your flow is deployed, then start a debugging session.

Before you begin

About this task

From the IBM Integration Toolkit, you can attach the flow debugger to multiple integration servers that are running on the same or on different host computers, and debug their flows (and therefore multiple messages) simultaneously.

An integration server can be debugged by only one user at a time. If you attach your debugger to an integration server, another user cannot attach a debugger to that same integration server until you have ended your debugging session.

To attach the debugger to an integration server:

Procedure

  1. Set a Flow Debug port number.
    To configure the integration node JVM with a debug port number, use one of the following methods:
    • In the Integration Nodes view in the IBM Integration Toolkit, right-click the integration server with which you want to work, and click Launch Debugger. Click Configure, and enter a port number. Click OK to enable debugging on the selected port, and attach the debugger to the selected integration server.
      Note: If the integration server is in recording mode (see Testing your message flow by using the Flow Exerciser), you cannot start the Flow debugger. You must stop recording mode on the integration server before the menu option to launch the debugger becomes active.
    • Set the Java™ debug port by running the mqsichangeproperties command (all on one line) in the Command Console:
      mqsichangeproperties integrationNodeName -e integration_server_name 
      -o ComIbmJVMManager -n jvmDebugPort -v port_number
      
      For example:
      mqsichangeproperties TEST -e default 
      -o ComIbmJVMManager -n jvmDebugPort -v 3920
      When this command completes, restart the integration node. See: Starting and stopping an integration node.
    The Java JIT (just-in-time) compiler is disabled if the jvmDebugPort parameter is set to an integer greater than zero. If you are not debugging a message flow, reset the jvmDebugPort parameter to zero to maximize performance.
    Warning: When the jvmDebugPort is enabled, a remote user can connect to the integration node's JVM and inspect its behavior and data, including potentially sensitive information. A remote user can also exert control over the integration node's behavior. It is therefore recommended that the jvmDebugPort is disabled on production systems.
  2. If you used the mqsichangeproperties command to configure the Flow Debug Port, you must use the Integration Nodes view in the IBM Integration Toolkit to attach the flow debugger to the integration server. Right-click the integration server with which you want to work, and click Launch Debugger, and click OK to attach the debugger to the selected integration server.
  3. Open the message flow that you want to debug in the Message Flow editor by double-clicking its name in the Application Development view.
  4. Add a breakpoint to a connection that leads out of the input node to ensure that the message flow does not run to completion before you can begin to debug it.

    The breakpoint appears as Enabled breakpoint. For information about adding a breakpoint, see Working with breakpoints in the flow debugger.

  5. Switch to the Debug perspective.
  6. Right-click the IBM Integration Bus Launch Configuration in the Debug view, and click Edit Source Lookup.
    You can use Edit Source Lookup Path to tell the debugger where to look for your source files for message flows, and related resources such as ESQL, message maps and Java during debugging.
  7. Click Add, and select the type of source to add to the lookup path.
    The lookup path can be an Eclipse project name, an external folder, or a compressed (.zip) file. You can specify multiple locations, but the debugger always looks first in the message flow project that you specify in the Edit Source Lookup Path dialog.
  8. Select the resources to include in the lookup path, and click OK.
  9. Click Add to include more resources in the lookup path, click Up, or Down to modify the order of the resources.
  10. Click OK to exit the Edit Source Lookup Path dialog, and save your changes.
  11. When the next message comes into your flow and arrives at breakpoint you added after the input node, the flow pauses, the breakpoint icon is highlighted: Enabled paused breakpoint, and you can start debugging.
  12. In the Debug view, double-click the message flow that you want to debug. The message flow opens in the Message Flow editor. You can now add more breakpoints, start stepping over the flow, and so on.

What to do next

Continue with one of the following tasks: