This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 01e70ea11c3 CAMEL-20078: camel-jbang - Debug command
01e70ea11c3 is described below

commit 01e70ea11c357c00838cee7761015cf2aecf5bf6
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sat Nov 4 15:44:58 2023 +0100

    CAMEL-20078: camel-jbang - Debug command
---
 .../camel/catalog/main/camel-main-configuration-metadata.json       | 2 +-
 .../src/main/java/org/apache/camel/spi/BacklogDebugger.java         | 6 +++---
 .../resources/META-INF/camel-main-configuration-metadata.json       | 2 +-
 core/camel-main/src/main/docs/main.adoc                             | 2 +-
 .../java/org/apache/camel/main/DebuggerConfigurationProperties.java | 4 ++--
 .../main/java/org/apache/camel/dsl/jbang/core/commands/Debug.java   | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index 50fc11640ed..3235de257b0 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -144,7 +144,7 @@
     { "name": "camel.debug.bodyIncludeFiles", "description": "Whether to 
include the message body of file based messages. The overhead is that the file 
content has to be read from the file.", "sourceType": 
"org.apache.camel.main.DebuggerConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": true },
     { "name": "camel.debug.bodyIncludeStreams", "description": "Whether to 
include the message body of stream based messages. If enabled then beware the 
stream may not be re-readable later. See more about Stream Caching.", 
"sourceType": "org.apache.camel.main.DebuggerConfigurationProperties", "type": 
"boolean", "javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.debug.bodyMaxChars", "description": "To limit the message 
body to a maximum size in the traced message. Use 0 or negative value to use 
unlimited size.", "sourceType": 
"org.apache.camel.main.DebuggerConfigurationProperties", "type": "integer", 
"javaType": "int", "defaultValue": 131072 },
-    { "name": "camel.debug.breakpoints", "description": "Allows to 
pre-configure breakpoints (node ids) to use with debugger on startup. Multiple 
ids can be separated by comma. Use special value route: to add a breakpoint for 
the first node for every route, in other words this makes it easy to debug from 
the beginning of every route without knowing the exact node ids.", 
"sourceType": "org.apache.camel.main.DebuggerConfigurationProperties", "type": 
"string", "javaType": "java.lang.String" },
+    { "name": "camel.debug.breakpoints", "description": "Allows to 
pre-configure breakpoints (node ids) to use with debugger on startup. Multiple 
ids can be separated by comma. Use special value _all_routes_ to add a 
breakpoint for the first node for every route, in other words this makes it 
easy to debug from the beginning of every route without knowing the exact node 
ids.", "sourceType": "org.apache.camel.main.DebuggerConfigurationProperties", 
"type": "string", "javaType": "java.lang.S [...]
     { "name": "camel.debug.enabled", "description": "Enables Debugger in your 
Camel application.", "sourceType": 
"org.apache.camel.main.DebuggerConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.debug.fallbackTimeout", "description": "Fallback Timeout 
in seconds (300 seconds as default) when block the message processing in Camel. 
A timeout used for waiting for a message to arrive at a given breakpoint.", 
"sourceType": "org.apache.camel.main.DebuggerConfigurationProperties", "type": 
"integer", "javaType": "long", "defaultValue": 300 },
     { "name": "camel.debug.includeException", "description": "Trace messages 
to include exception if the message failed", "sourceType": 
"org.apache.camel.main.DebuggerConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": true },
diff --git 
a/core/camel-api/src/main/java/org/apache/camel/spi/BacklogDebugger.java 
b/core/camel-api/src/main/java/org/apache/camel/spi/BacklogDebugger.java
index 5b4bef80f76..284f33844fa 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/BacklogDebugger.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/BacklogDebugger.java
@@ -54,18 +54,18 @@ public interface BacklogDebugger extends StatefulService {
     /**
      * Special breakpoint id token to automatically add breakpoint for every 
route.
      */
-    String BREAKPOINT_ALL_ROUTES = "route:*";
+    String BREAKPOINT_ALL_ROUTES = "_all_routes_";
 
     /**
      * Allows to pre-configure breakpoints (node ids) to use with debugger on 
startup. Multiple ids can be separated by
-     * comma. Use special value route:* to add a breakpoint for the first node 
for every route, in other words this
+     * comma. Use special value _all_routes_ to add a breakpoint for the first 
node for every route, in other words this
      * makes it easy to debug from the beginning of every route without 
knowing the exact node ids.
      */
     String getInitialBreakpoints();
 
     /**
      * Allows to pre-configure breakpoints (node ids) to use with debugger on 
startup. Multiple ids can be separated by
-     * comma. Use special value route:* to add a breakpoint for the first node 
for every route, in other words this
+     * comma. Use special value _all_routes_ to add a breakpoint for the first 
node for every route, in other words this
      * makes it easy to debug from the beginning of every route without 
knowing the exact node ids.
      */
     void setInitialBreakpoints(String initialBreakpoints);
diff --git 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 50fc11640ed..3235de257b0 100644
--- 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -144,7 +144,7 @@
     { "name": "camel.debug.bodyIncludeFiles", "description": "Whether to 
include the message body of file based messages. The overhead is that the file 
content has to be read from the file.", "sourceType": 
"org.apache.camel.main.DebuggerConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": true },
     { "name": "camel.debug.bodyIncludeStreams", "description": "Whether to 
include the message body of stream based messages. If enabled then beware the 
stream may not be re-readable later. See more about Stream Caching.", 
"sourceType": "org.apache.camel.main.DebuggerConfigurationProperties", "type": 
"boolean", "javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.debug.bodyMaxChars", "description": "To limit the message 
body to a maximum size in the traced message. Use 0 or negative value to use 
unlimited size.", "sourceType": 
"org.apache.camel.main.DebuggerConfigurationProperties", "type": "integer", 
"javaType": "int", "defaultValue": 131072 },
-    { "name": "camel.debug.breakpoints", "description": "Allows to 
pre-configure breakpoints (node ids) to use with debugger on startup. Multiple 
ids can be separated by comma. Use special value route: to add a breakpoint for 
the first node for every route, in other words this makes it easy to debug from 
the beginning of every route without knowing the exact node ids.", 
"sourceType": "org.apache.camel.main.DebuggerConfigurationProperties", "type": 
"string", "javaType": "java.lang.String" },
+    { "name": "camel.debug.breakpoints", "description": "Allows to 
pre-configure breakpoints (node ids) to use with debugger on startup. Multiple 
ids can be separated by comma. Use special value _all_routes_ to add a 
breakpoint for the first node for every route, in other words this makes it 
easy to debug from the beginning of every route without knowing the exact node 
ids.", "sourceType": "org.apache.camel.main.DebuggerConfigurationProperties", 
"type": "string", "javaType": "java.lang.S [...]
     { "name": "camel.debug.enabled", "description": "Enables Debugger in your 
Camel application.", "sourceType": 
"org.apache.camel.main.DebuggerConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.debug.fallbackTimeout", "description": "Fallback Timeout 
in seconds (300 seconds as default) when block the message processing in Camel. 
A timeout used for waiting for a message to arrive at a given breakpoint.", 
"sourceType": "org.apache.camel.main.DebuggerConfigurationProperties", "type": 
"integer", "javaType": "long", "defaultValue": 300 },
     { "name": "camel.debug.includeException", "description": "Trace messages 
to include exception if the message failed", "sourceType": 
"org.apache.camel.main.DebuggerConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": true },
diff --git a/core/camel-main/src/main/docs/main.adoc 
b/core/camel-main/src/main/docs/main.adoc
index a7c11d4c240..bd0442cc8b0 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -181,7 +181,7 @@ The camel.debug supports 11 options, which are listed below.
 | *camel.debug.bodyIncludeFiles* | Whether to include the message body of file 
based messages. The overhead is that the file content has to be read from the 
file. | true | boolean
 | *camel.debug.bodyIncludeStreams* | Whether to include the message body of 
stream based messages. If enabled then beware the stream may not be re-readable 
later. See more about Stream Caching. | false | boolean
 | *camel.debug.bodyMaxChars* | To limit the message body to a maximum size in 
the traced message. Use 0 or negative value to use unlimited size. | 131072 | 
int
-| *camel.debug.breakpoints* | Allows to pre-configure breakpoints (node ids) 
to use with debugger on startup. Multiple ids can be separated by comma. Use 
special value route: to add a breakpoint for the first node for every route, in 
other words this makes it easy to debug from the beginning of every route 
without knowing the exact node ids. |  | String
+| *camel.debug.breakpoints* | Allows to pre-configure breakpoints (node ids) 
to use with debugger on startup. Multiple ids can be separated by comma. Use 
special value _all_routes_ to add a breakpoint for the first node for every 
route, in other words this makes it easy to debug from the beginning of every 
route without knowing the exact node ids. |  | String
 | *camel.debug.enabled* | Enables Debugger in your Camel application. | false 
| boolean
 | *camel.debug.fallbackTimeout* | Fallback Timeout in seconds (300 seconds as 
default) when block the message processing in Camel. A timeout used for waiting 
for a message to arrive at a given breakpoint. | 300 | long
 | *camel.debug.includeException* | Trace messages to include exception if the 
message failed | true | boolean
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/DebuggerConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/DebuggerConfigurationProperties.java
index 885b11aae7a..c06b602181e 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/DebuggerConfigurationProperties.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/DebuggerConfigurationProperties.java
@@ -105,7 +105,7 @@ public class DebuggerConfigurationProperties implements 
BootstrapCloseable {
 
     /**
      * Allows to pre-configure breakpoints (node ids) to use with debugger on 
startup. Multiple ids can be separated by
-     * comma. Use special value route:* to add a breakpoint for the first node 
for every route, in other words this
+     * comma. Use special value _all_routes_ to add a breakpoint for the first 
node for every route, in other words this
      * makes it easy to debug from the beginning of every route without 
knowing the exact node ids.
      */
     public void setBreakpoints(String breakpoints) {
@@ -221,7 +221,7 @@ public class DebuggerConfigurationProperties implements 
BootstrapCloseable {
 
     /**
      * Allows to pre-configure breakpoints (node ids) to use with debugger on 
startup. Multiple ids can be separated by
-     * comma. Use special value route:* to add a breakpoint for the first node 
for every route, in other words this
+     * comma. Use special value _all_routes_ to add a breakpoint for the first 
node for every route, in other words this
      * makes it easy to debug from the beginning of every route without 
knowing the exact node ids.
      */
     public DebuggerConfigurationProperties withBreakpoints(String breakpoints) 
{
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Debug.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Debug.java
index f1ad8e8b247..4772f4fbca7 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Debug.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Debug.java
@@ -233,7 +233,7 @@ public class Debug extends Run {
         // enable light-weight debugger (not camel-debug JAR that is for 
IDEA/VSCode tooling with remote JMX)
         cmds.add("--prop=camel.debug.enabled=true");
         if (breakpoint == null) {
-            cmds.add("--prop=camel.debug.breakpoints=route:*");
+            cmds.add("--prop=camel.debug.breakpoints=_all_routes_");
         } else {
             cmds.add("--prop=camel.debug.breakpoints=" + breakpoint);
         }

Reply via email to