WebSphere Message Brokers
File: ag11186_
Writer: John Morris-Smith

Task topic

This build: July 31, 2007 21:29:38

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. You can attach the flow debugger to multiple flow engines that are running on the same or on different host machines, and then simultaneously debug their flows.

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

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 that 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 New. A set of tabbed panels appears in the window, beginning with Connect.
    Tip: You cannot click Debug 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. Java debug setting: use this panel to debug a Java user-defined node or a 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
      To debug a JavaCompute node, or a user-defined node containing Java code, configure the broker JVM 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>
      Restart the broker when this command has completed.
    2. 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, an external folder, or a compressed (zipped) file. You can specify multiple locations, but the debugger always looks first in the message flow project that you specified on the Connect panel.
    3. 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 Debug. 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.

The flow debugger 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.

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

Related concepts
Flow debugger overview
Related tasks
Deploying
Debugging a message flow
Debug: detaching from the flow engine
Related reference
Flow debugger shortcuts
Flow debugger icons and symbols
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:29:39

ag11186_ This topic's URL is: