이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 4. Using VS Code Debug Adapter for Apache Camel extension


Important

The VS Code extensions for Apache Camel are listed as development support. For more information about scope of development support, see Development Support Scope of Coverage for Red Hat Build of Apache Camel.

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.

4.1. Features of Debug Adapter

The VS Code Debug Adapter for Apache Camel extension supports the following features:

  • Camel Main mode for XML only.
  • The use of Camel debugger by attaching it to a running Camel route written in Java, Yaml or XML using the JMX url.
  • The local use of Camel debugger by attaching it to a running Camel route written in Java, Yaml or XML using the PID.
  • You can use it for a single Camel context.
  • Add or remove the breakpoints.
  • The conditional breakpoints with simple language.
  • Inspecting the 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, in the message body, in a message header of type String, and an exchange property of type String
  • Supports the command Run Camel Application with JBang and Debug.

    • This command 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 the 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).
  • Supports the command Run Camel application with JBang.

    • It requires a valid Camel file defined in Yaml DSL (.yaml|.yml) opened in editor.
  • Configuration snippets for Camel debugger launch configuration
  • Configuration snippets to launch a Camel application ready to accept a Camel debugger connection using JBang, or Maven with Camel maven plugin

4.2. Requirements

Following points must be considered when using the VS Code Debug Adapter for Apache Camel extension:

  • Java Runtime Environment 17 or later with com.sun.tools.attach.VirtualMachine (available in most JVMs such as Hotspot and OpenJDK) must be installed.
  • The Camel instance to debug must follow these requirements:

    • Camel 3.16 or later
    • Have camel-debug on the classpath.
    • Have JMX enabled.
Note

For some features, The JBang must be available on a system commandline.

4.3. Installing VS Code Debug Adapter for Apache Camel

You can download the VS Code Debug Adapter for Apache Camel extension from the VS Code Extension Marketplace and the Open VSX Registry. You can also install the Debug Adapter for Apache Camel extension directly in the Microsoft VS Code.

Procedure

  1. Open the VS Code editor.
  2. In the VS Code editor, select View > Extensions.
  3. In the search bar, type Camel Debug. Select the Debug Adapter for Apache Camel option from the search results and then click Install.

This installs the Debug Adapter for Apache Camel in the VS Code editor.

4.4. Using Debug Adapter

Following procedure explains how to debug a camel application using the debug adapter.

Procedure

  1. Ensure that the jbang binary is available on the system commandline.
  2. Open a Camel route which can be started with Camel CLI.
  3. Call the command Palette using the keys Ctrl + Shift + P, and select the Run Camel Application with JBang and Debug command or click on the codelens Camel Debug with JBang that 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.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat