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

davsclaus pushed a commit to branch fix/CAMEL-23851
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 2bbbe9825d8ed016e04cce84296ea916fceb02e0
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Jun 29 10:30:25 2026 +0200

    CAMEL-23851: camel-debug - Fix breakpoint on first EIP incorrectly stopping 
at route input
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../java/org/apache/camel/impl/engine/DefaultChannel.java     | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultChannel.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultChannel.java
index 34c4acb82499..432612f68c93 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultChannel.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultChannel.java
@@ -347,10 +347,14 @@ public class DefaultChannel extends 
CamelInternalProcessor implements Channel {
         // setup initial breakpoints
         if (debugger.getInitialBreakpoints() != null) {
             boolean match = false;
+            boolean allRoutes = false;
             String id = definition.getId();
             for (String pattern : debugger.getInitialBreakpoints().split(",")) 
{
                 pattern = pattern.trim();
-                match |= BacklogDebugger.BREAKPOINT_ALL_ROUTES.equals(pattern) 
&& first;
+                if (BacklogDebugger.BREAKPOINT_ALL_ROUTES.equals(pattern) && 
first) {
+                    match = true;
+                    allRoutes = true;
+                }
                 if (!match) {
                     match = PatternHelper.matchPattern(id, pattern);
                 }
@@ -387,13 +391,12 @@ public class DefaultChannel extends 
CamelInternalProcessor implements Channel {
                 }
             }
             if (match) {
-                if (first && debugger.isSingleStepIncludeStartEnd()) {
-                    // we want route to be breakpoint (use input)
+                if (allRoutes && first && 
debugger.isSingleStepIncludeStartEnd()) {
+                    // all routes breakpoint: we want route to be breakpoint 
(use input)
                     id = routeDefinition.getInput().getId();
                     debugger.addBreakpoint(id);
                     LOG.debug("BacklogDebugger added breakpoint: {}", id);
                 } else {
-                    // first output should also be breakpoint
                     id = targetOutputDef.getId();
                     debugger.addBreakpoint(id);
                     LOG.debug("BacklogDebugger added breakpoint: {}", id);

Reply via email to