Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip

There is also a BacklogDebugger which allows to debug from JMX, and 3rd party tooling such as the hawtio web console.

About the Debugger

The Debugger allows tooling or the likes to attach breakpoints which is being invoked when Exchanges is being routed.

...

In this unit test

Code Block

public class DebugTest extends CamelTestSupport

We want to debug the following route

Wiki Markup
{snippet:id=e2|lang=java|url=camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/DebugTest.java}
Which can easily done by overriding the debugBefore method as shown
Wiki Markup
{snippet:id=e1|lang=java|url=camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/DebugTest.java}
Then from your Java editor just add a breakpoint inside the 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.

...