Attaching to the flow engine

Before you start

To complete this task, you must have completed the following tasks:

To debug a deployed flow

Before you can debug your message flow, you must attach the flow debugger to the flow engine (execution group) where your flow is deployed. If you want to, you can attach the flow debugger to multiple flow engines that are running on the same or different host machines and then simultaneously debug their flows.

To attach to the flow engine:

  1. Switch to the Broker Administration perspective. Note the name of your message flow as displayed in the Domains pane.
  2. Open that flow into the Message Flow editor by double-clicking its name in the Broker Administration Navigator pane.
  3. Add a breakpoint to a connection that leads out of the input node of the message flow. Adding this breakpoint ensures 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).

  4. Switch to the Debug perspective.
  5. Click the down-arrow on the Debug icon Launch Debug on the toolbar, and select Debug to invoke the Debug (Create, manage, and run configurations) wizard.
    Tip: You are creating a debug launch configuration. If you have already created one, you can relaunch it by clicking directly on the Debug icon Launch Debug itself. Note, however, that this will generate an error if:
    • You have not created a debug launch configuration
    • The broker and execution group you previously attached to are no longer running
    • The broker and execution group have been restarted and hence have a new Process ID (see below).
  6. In the list of configurations, select Message Broker Debug and click the New button. A set of tabbed panels appears in the window, beginning with Connect.
    Tip: The Debug button remains grayed out until you complete the fields on the Connect panel. After that you can choose to complete the fields on the other panels, or go straight to clicking Debug.
    The panels in the wizard are as follows:-
    1. Connect - use this panel to establish a connection to the flow engine through the IBM Agent Controller. You must complete all the fields on this panel before you can click the Debug button to start a debug session

      IBM Agent Controller port number
      enter the port number you want to use.
      Flow Project
      select your flow project.
      HostName
      select the host computer that the flow engine is running on. If the host is not listed, enter the host name or IP address of the host computer in the HostName field (if the HostName field is not available, first click the Reset button, then make your changes).
      Flow Engine
      select the broker and flow engine you want to debug. In the list box that opens when you click the Browse button, each flow engine is listed as its process number, followed by the name of the broker and the name of the execution group separated by a colon, for example:
      ProcessID    Engine name
      ---------    ---------------
      5984         WMBV6BR:default
      If the flow engine does not appear in the list box, click Refresh to update the list box with the names of all flow engines that are currently deployed and available on the host computer. (If the flow engine still does not appear in the list box, try restarting IBM Agent Controller on the host computer).
      Note: You will be presented with the option of attaching to any execution group running on the target host. This includes execution groups that do not have any flows deployed.
      Tip: The process number is the Windows PID, as listed in the Task Manager on the Processes page. The PID was reported to you in the Event Log when you deployed, as described in Deploying a publish/subscribe topology.
      You can now click Debug to go the next step, or you can go on to complete the other panels as follows.
    2. Java debug setting - use this panel when you want to debug a Java plugin node or Java compute node. The Java port is the port number that is specified for the broker JVM. If you do not specify a port, Java debugging is disabled.
      Tip:
      Setting the broker JVM debug port
      In order to debug a JavaCompute node, or a user defined node containing Java code, the broker JVM must be configured with a debug port number. To do this issue the following command (all on one line):
      mqsichangeproperties <broker-name> -e <execution-group-name>
       -o ComIbmJVMManager -n jvmDebugPort -v <port-number>
      The broker must be restarted after this command has been issued.
    3. Source - use this panel to tell the debugger where to look for your source files for flow, mapping, ESQL, or Java during debugging. The lookup path can be an eclipse project name, external folder, or a zipped file. You can specify multiple locations, but the debugger will always first look in the message flow project that you specified on the Connect panel.
    4. Common - this panel is not directly used by the flow debugger, however if you set options on it they will take effect. See the Workbench User Guide for details.
  7. Click the Debug button. In the Debug view, the names of the selected host computer and flow engine are displayed.
  8. When the next message comes into your flow and arrives at the breakpoint, the flow pauses, the breakpoint icon changes to  Enabled paused breakpoint , and you can start debugging.
  9. In the Debug view, double-click the message flow that you want to debug. The message flow opens in the Message Flow editor, and now you can add more breakpoints, start stepping over the flow, and so on.
Tip: From a single workbench, the debugger can attach to more than one execution group, and debug multiple flows in different execution groups (and therefore multiple messages) at the same time. However, a deployed flow in one execution group can be debugged by only one user at a time, so if you attach your debugger to it, another user cannot also attach a debugger at the same time.
Note: The flow debugger provided in Version 6.0 can debug runtime brokers from previous versions. You can select the version of the broker that you want to debug by checking the corresponding option on the Engine Selection panel in the Debug wizard as described above.
The following table shows what is supported on different platforms. RAC is the short name for IBM Agent Controller.
  Version 6.0 Broker + RAC 6.0 Version 5 Broker + Fix Pack 3 or later + RAC 5.0.2 Version 5 Broker + Fix Pack 2 + RAC 5.0.2 Version 5 Broker + Fix Pack 2 + RAC 5.0.1
Windows Yes Yes Yes Yes
AIX Yes Yes Yes Yes
Solaris Yes Yes Yes No
HP-UX Yes Yes No No
z/OS Yes Yes No No
Linux Yes Yes (with IFix) No No

Contact your IBM Support Center if you want to use the flow debugger with a Fix Pack 3 broker on Linux.

Related concepts
Flow debugger overview