Skip to content

hdamarcelo/camel-dap-client-vscode

 
 

Repository files navigation


Debug Adapter for Apache Camel

Marketplace Version Main CI License Zulip


DAP Client for Visual Studio Code.

FeaturesRequirementsExampleDocumentationIssuesTelemetry

This is the Visual Studio Code extension that adds Camel Debugger power by attaching to a running Camel route written in Java, Yaml or XML DSL.


A breakpoint hit on a Camel route endpoint and the variables displayed.

Features

  • Camel Main mode for XML only (It implies that it is not working with Camel context specified in Camel XML file.)
    • Support use of Camel debugger by attaching to a running Camel route written in Java, Yaml or XML using the JMX Url
    • Support local use of Camel debugger by attaching to a running Camel route written in Java, Yaml or XML using the PID
  • Support a single Camel context
  • Add/Remove breakpoints
  • Support conditional breakpoints with simple language. See How to write condition with simple language for details.
  • Inspect variable values on suspended breakpoints
  • Resume a single route instance and resume all route instances
  • Stepping when the route definition is in the same file
  • Allow to update variables:
    • in scope Debugger
    • the message body
    • a message header of type String
    • an exchange property of type String
  • Command Run Camel Application with JBang and Debug. It allows a one-click start and Camel debug in simple cases. This command is available through:
    • Command Palette. It requires a valid Camel file opened in current editor.
    • Contextual menu in File explorer. It is visible to all *.xml, *.java, *.yaml and *.yml.
    • Codelens at the top of a Camel file (the heuristic for the codelens is checking that there is a from and a to or a log on java, xml and yaml files).
  • Command Run Camel application with JBang.
    • Support automatic reload mode --dev by default
    • It requires a valid Camel file defined in Yaml DSL (.yaml|.yml) opened in editor.
    • Contextual menu in File explorer. It is visible to all *.yaml and *.yml.
    • Codelens at the top of a Camel file.
  • Configuration snippets for Camel debugger launch configuration
  • Configuration snippets to launch Camel application ready to accept a Camel debugger connection using JBang, Maven with Camel maven plugin or Quarkus Devs

Requirements

  • Java Runtime Environment 17+ with com.sun.tools.attach.VirtualMachine (available in most JVMs such as Hotspot and OpenJDK). The java.home VS Code preferences can be used to use a different version of JDK than the default one installed on the machine.

  • The Camel instance to debug must follow these requirements:

    • Camel 3.16+
    • Have camel-debug on the classpath
    • Have JMX enabled
  • ⚠️ For some features, The JBang must be available on a system command-line.

How To Debug - example

  1. Ensure jbang is available on system command-line
  2. Open a Camel route which can be started with JBang
  3. Call command Palette (Ctrl + Shift + P), and pick command Run Camel Application with JBang and Debug or click on codelens Camel Debug with JBang which appears on top of the file.
  4. Wait until the route is started and debugger is connected
  5. Put a breakpoint on the Camel route
  6. Debug! 🔥

appy path to start and debug Camel route.

Documentation

Our full documentation is located in GitHub pages. Included are details about all of DAP Client for Visual Studio Code capabilities with examples and detailed information.

Issues

Something is not working properly? In that case, feel free to open issues, add feature requests, report bugs, etc.

Get Involved

If you'd like to help us get better, we appriciate it! Check out our Contribution Guide on how to do that.

Data and Telemetry

The DAP Client for Visual Studio Code extension collects anonymous usage data and sends it to Red Hat servers to help improve our products and services. Read our privacy statement to learn more. This extension respects the redhat.telemetry.enabled setting which you can learn more about at How to disable telemetry reporting.

About

Client for the Debug Adapter implementation for Apache Camel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.8%
  • Java 8.7%
  • JavaScript 0.5%