...
There is also a BacklogDebugger which allows to debug from JMX, and 3rd party tooling.
...
If you are developing unit tests using the camel-test
component, then the Debugger comes out of the box. From Camel 2.9: you would need to explicit enable the debugger, by overriding isUseDebugger()
method and return true
.
Example
In this unit test
...
...
We want to debug the following route: Wiki Markup debugBefore
method as shown: Wiki Markup debugBefore
method. Then fire up the unit test and wait for the Java editor to hit the breakpoint. Then you can inspect the Exchange during debugging while it advances during routing. The ProcessorDefinition
and the id
and shortName
parameters is all information which tells you where in the route the breakpoint was hit.
...
...
There is also a debugAfter
method which is invoked after the processor has been invoked. This allows you to see what happens to the Exchange right after it has invoked a processor in the route.
The screenshot below shows the Debugger in action. The IDE (IDEA) has hit the breakpoint and we can inspect the parameters. Notice how we can see that the message is to be send to the mock:a
endpoint:
...