Debug Adapter for Apache Camel based on the Debug Adapter Protocol and Eclipse LSP4J as SDK.
The Debug Adapter allows to set breakpoints and debug Camel textual DSLs.
The Camel instance to debug must follow these requirements:
camel-debug
on the classpathThe Camel Debug Server Adapter must use Java Runtime Environment 11+ with com.sun.tools.attach.VirtualMachine
(available in most JVMs such as Hotspot and OpenJDK).
Debugger
scopesimple
language. See here for details on how to write condition with simple language.camel:debug
Maven goal, or org.apache.camel.debugger.suspend
system property set to true
or CAMEL_DEBUGGER_SUSPEND
environment variable set to true
.All clients supporting the Debug Adapter protocol can be used. The configuration might be tricky for some of them. For easier configuration see:
java -jar camel-dap-server-xxx.jar
to use the default JMX url: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel
{
"request": "attach"
}
or the JMX url can be explicitly specified:
{
"attach_jmx_url": "xxxxx",
"request": "attach"
}
or when running locally, the PID of the Camel application can be provided:
{
"attach_pid": "xxxxx",
"request": "attach"
}
Note that the request parameter is not part of the protocol but required by some clients (at least VS Code and Eclipse desktop).