Table of Contents
The Camel debugger includes many features for debugging locally and remotely running routing contexts:
Interacting with the running routing context:
![]() | Note |
|---|---|
Before you can run the Camel debugger, you must set breakpoints on the nodes of interest
displayed on the route editor’s canvas. Then you can run the Camel debugger on a
project’s routing context |
To set breakpoints, your project’s routing context .xml file must
be open in the route editor’s Design tab.
The Camel debugger supports two types of breakpoints:
![]() | Note |
|---|---|
You cannot set breakpoints on consumer endpoints or on |
With your routing context displayed on the canvas in the Design tab:
icon to set an unconditional breakpoint.With your routing context displayed on the canvas in the Design tab:
Click its
icon to set a conditional breakpoint and to open the
Edit the condition and language of your breakpoint…
dialog:

Click the Language drop-down menu and select the expression language to use to create the condition that will trigger the breakpoint.
Fuse Tooling supports twenty-four expression languages. Some of these languages provide variables for creating conditional expressions, while others do not.
Click Variables to display a list of the selected language’s supported variables.
If a list appears, select in sequence one or more of the variables to create the condition for triggering the breakpoint. The variables you select appear in the Condition text box.
If
appears, enter the expression directly into the
Condition text box.
You can temporarily disable a breakpoint, leaving it in place, then enable it again
later. The
button skips over disabled breakpoints during debugging
sessions.
To disable a breakpoint, select the node on the canvas and click its
icon. The breakpoint turns gray, indicating that it has been
disabled.
To enable a disabled breakpoint, select the node on the canvas and click its
icon. Depending on whether the disabled breakpoint is conditional
or unconditional, it turns yellow or red, respectively, to indicate that it has been
re-enabled.
![]() | Note |
|---|---|
You can also disable and re-enable breakpoints during debugging sessions. For details, see Disabling Breakpoints in a Running Context. |
You can delete individual breakpoints or all breakpoints.
icon.
Delete all breakpoints.
Delete all breakpoints.Table of Contents
You can run the Camel debugger on locally running routing contexts and on remotely running routing contexts. The same basic features and functionality are available in both debugging modes.
![]() | Note |
|---|---|
If your project contains Java code, you can use the standard Eclipse Java debugging tools to debug it. For local debugging, it is automatically available. For remote debugging, you need to use the Remote Camel Context and Java launch option (see Debugging a remotely running routing context). |
![]() | Note |
|---|---|
You must set breakpoints in your routing context file before you can start the Camel debugger. |
Right-click the selected file to open the context menu, and then select > .
Fuse Tooling builds the Camel route, starts Apache Camel, starts the routing context, enables JMX, starts the route(s) in the routing context, adds the breakpoints to the nodes, and enables the Camel debugger.
The Camel debugger suspends execution of the routing context at the first breakpoint hit (received a message), and prompts you to indicate whether you want it to open the Debug perspective.

Click Yes to open the Debug perspective.
The Debug perspective opens with the routing context suspended at the first breakpoint encountered in the running routing context.
![]() | Important |
|---|---|
Breakpoints are held for a maximum of five minutes, after which debugging automatically resumes, moving on to the next breakpoint or to the end of the routing context. |

![]() | Note |
|---|---|
To see the console output, open the Console view if it was not open when you switched perspectives. |
![]() | Note |
|---|---|
By default, the Debug perspective displays the Outline view, which provides the means to switch between separate routes in a running routing context. If your routing context contains a single route, closing the Outline view frees space to expand the other views, making it easier to access and examine debugger output. |
Access to a JBoss Fuse runtime in one of the following ways:
FUSE_HOME/etc/users.properties
file to activate the admin user. For details,
see Adding a Server.admin user.Create a new Fuse Integration project, see Configuring project basics. In the Fuse Integration project:
Create an empty Blueprint DSL project or use one of the JBoss Fuse pre-defined templates with Blueprint DSL.
![]() | Note |
|---|---|
Though not a requirement, it is a good idea to verify that
you can run the project’s routing context successfully as a
|
![]() | Note |
|---|---|
The examples in Setting up and starting remote debugging are based on the > pre-defined template and a Red Hat JBoss Fuse 6.3.0 runtime. |
In Red Hat JBoss Developer Studio:
Publish your project to the JBoss Fuse Runtime server. For details, see Publishing Fuse projects automatically when resources change.
![]() | Note |
|---|---|
You cannot deploy a Fuse Integration project to a JBoss Fuse server running on a remote host from inside JBoss Developer Studio. Instead, you deploy the project’s bundle directly on the remote host using one of two supported deployment methods (for details, see ). |
With the project deployed on JBoss Fuse and the server stopped, you need to set up and start remote debugging as follows:
To set up and start remote debugging:
Open a terminal outside of JBoss Developer Studio, and enter
$ [FUSE_HOME]/bin/fuse debug
In the Project Explorer view, right-click the project’s root and select menu:[Debug As > Debug Configurations] to open the Debug Configurations wizard:

In the configuration type pane, select either Remote Camel
Context or Remote Camel Context and
Java , and then click
:

For both the Remote Camel Context and Remote Camel Context and Java options, you need to specify configuration details on the Camel and JMX tabs.
For the Remote Camel Context and Java option only, you also need to specify configuration details on the Connect tab.
![]() | Note |
|---|---|
Unless your project contains Java code that you want to debug using the standard Eclipse Java debugging tools, select the Remote Camel Context option. |
On the Camel tab, click the
button to locate the project’s routing
context .xml file in the Open
Resources dialog:

![]() | Note |
|---|---|
When you select a file in the Matching items pane, the tooling displays the file’s location, relative to the project root, at the bottom of the pane. |
In the Matching items pane, select your project’s routing context file from the list, and then click .
The tooling inserts the file’s path into the Select Camel Context file field:

Click the JMX tab:

Edit the JMX connection details as follows:
JMX Uri — change
:9011/jmxrmi to
:1099/karaf-root
If the JBoss Fuse server is running on a remote host, replace
localhost with the DNS name or IP address
of the remote host.
admin.JMX Password — enter
admin.
![]() | Important |
|---|---|
The values shown for JMX User and JMX Password are
the JBoss Fuse admin user defaults,
stored in the
|
If you are creating a Remote Camel Context debug launch configuration, you are done. Skip to [debugCfgGo].
Click the Connect tab:

Change the Port value from 8000 to
5005. Leave each of the
other properties as is.
In the JMX Navigator view, double-click JBoss Fuse [xxx] [Disconnected] to connect to it, and then expand its tree:

In the Project Explorer view, drag a test message from
src/test/resources/data and drop it on the
cbr-example-context/Endpoints/file/work/cbr/input
folder in the JMX Navigator view.
When the message hits the first breakpoint that is set in the routing context, the tooling asks you to switch to the Debug perspective:

Click Yes.

At this point, you can use any of the Camel debugger’s tools to debug your routing context.
![]() | Note |
|---|---|
In remote debugging sessions, the Console view does not display log output. |
![]() | Note |
|---|---|
When one message reaches the end of the routing context, the debugger is suspended. To continue debugging, switch back to the Fuse Integration perspective and drop another message on the input node in the JMX Navigator view. Each time you do so, the tooling asks you to confirm the switch to the Debug perspective. |
The way to stop the Camel debugger depends on the mode in which it is running:
Local debugging (Debugging a locally running routing context)
To stop the Camel debugger, click
on the menu bar once if the debugging session has ended.
Otherwise, click
twice: once to terminate the currently running node thread
and once to terminate the Camel Context thread (both
displayed in the Debug view).
![]() | Note |
|---|---|
Terminating the Camel debugger also terminates the console but does not
clear its output. To clear the output, click
|
Remote debugging (Debugging a remotely running routing context)
To stop the Camel debugger, select the [Remote Camel
Context] thread or the [Remote Camel Context and
Java] thread in the Debug view, and then
click
on the menu bar.
![]() | Note |
|---|---|
Terminating the Camel debugger does not close the connection to the remote runtime server in the Servers view nor in the JMX Navigator view. |
After you have finished debugging your project, you may want to close the Debug perspective to make more space for your workbench.
To do so, right-click
on the right side of the JBoss Developer Studio toolbar, and then
select Close.
When the Camel debugger hits a breakpoint, the Variables view displays the values of all variables available at that point in the routing context. Some variables are editable, allowing you to change their value. This enables you to see how the application handles changes in program state.
![]() | Note |
|---|---|
Not all variables are editable. The context menu of editable variables displays the Change Value… option. |
To change the value of a variable:
In the Variables view, select a variable whose value you want to change, and then click its Value field.

The variable’s value field turns a lighter shade of blue, indicating that it is in edit mode.
![]() | Note |
|---|---|
Alternatively, you can right-click the variable to open its context menu, and select Change Value… to edit its value. |
Enter the new value and then click Enter.
The Console view displays an INFO level log
entry noting the change in the variable’s value (for example,
Breakpoint at node to1 is updating message header on exchangeId:
ID-dhcp-97-16-bos-redhat-com-52574-1417298894070-0-2 with header:
Destination and value: UNITED KINGDOM).
By adding variables to the watch list, you can focus on particular variables to see whether their values change as expected as they flow through the routing context.
To add a variable to the watch list:
In the Variables view, right-click a variable you want to track to open the context menu.

A new view, Expressions, opens next to the Breakpoints view. The Expressions view displays the name of the variable being watched and its current value, for example:

Repeat [watch1] and [watch2] to add additional variables to the watch list.
![]() | Note |
|---|---|
The variables you add remain in the watch list until you remove them. To stop watching a variable, right-click it in the list to open the context menu, and then click Remove. |
You can disable and re-enable breakpoints in a running routing context in the Breakpoints view.
When a breakpoint is disabled, the
button causes the debugger to skip over it during the debugging
session.
The Breakpoints view opens with all set breakpoints enabled.

To disable a breakpoint, clear its check box.

For each breakpoint you disable, the Console view displays an
INFO level log entry noting that it has been disabled (for example,
Removing breakpoint log2). Likewise, for each breakpoint you
re-enable, the Console view displays an INFO level log entry noting
that it has been enabled (for example, Adding breakpoint
log2).
![]() | Note |
|---|---|
To re-enable a disabled breakpoint, click its check box. The Console view
displays an |