Versions Compared

Key

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

Debugger

Camel supports Debugger is much related to Tracer, in fact they are sisters. Debugger is a enhanced tracer with a debugger framework so that tooling can be developed to easily monitor Camel routes, trace messages and set breakpoints at points in a route etc.

...

You can grab the debugger from the CamelContext via the Debugger.getInstancegetDebugger(context) method or via the Main.getDebugger() method - which returns null if it is not enabled.

Enabling from Main

To enable debugging from the main run

...

Wiki Markup
{snippet:id=example|lang=java|url=activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/debug/DebugTest.java}

The Debugger can also be added to the routes as an interceptor as the following unit test below demonstrates:

Wiki Markup
{snippet:id=e1|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DebugInterceptorTest.java}

About the Debugger

The Debugger has access to every single DebugInterceptor for each node in the Camel EIP route. You can look up the individual interceptor by the Node ID where you can access

...