Attaching to the flow engine for debugging

Before you start

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

Before you can debug your message flow, you must attach the flow debugger to the flow engine (execution group) where your flow is deployed and start a debug session. 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.

Start of changeYou cannot debug flows that you have deployed to a 64-bit execution group; only 32-bit execution groups are supported by the flow debugger.End of change

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 the message flow that you want to debug in 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 in the debugger).

  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. This action generates an error if any of the following conditions is true:
    • 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 therefore 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 Rational Agent Controller. You must complete all the fields on this panel before you can click the Debug button to start a debug session

      Agent Controller port number
      Enter the port number that 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 that 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 RAC on the host computer).

      You are 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.
      Now click Debug to go the next step, or complete the other panels as follows.
    2. Java debug setting: use this panel when you want to debug a Java user-defined node or JavaCompute 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 set this value, issue the following command (all on one line):
      mqsichangeproperties <broker-name> -e <execution-group-name>
       -o ComIbmJVMManager -n jvmDebugPort -v <port-number>
      You must restart the broker when this command has completed.
    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 compressed (zipped) file. You can specify multiple locations, but the debugger always first looks 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 do 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, therefore if you attach your debugger to it, another user cannot also attach a debugger at the same time.
Start of change

The flow debugger provided in Version 6.0 can debug runtime brokers from previous versions. 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.

For details of which version of Rational Agent Controller (RAC) you must install on each of the broker platforms, see Installing Rational Agent Controller.

Now that you have completed this task, you can continue with one of the following tasks:

End of change
Related concepts
Flow debugger overview
Related tasks
Installing Rational Agent Controller
Deploying
Debugging a message flow
Debug: detaching from the flow engine
Related reference
Flow debugger shortcuts
Flow debugger icons and symbols