essobedo opened a new pull request, #7867: URL: https://github.com/apache/camel/pull/7867
Fix for https://issues.apache.org/jira/browse/CAMEL-18217 ## Motivation Up to now when using the BacklogDebugger there is no easy way to suspend all messages before ensuring that all breakpoints have been defined. This can particularly be a problem when debugging an application with a very short lifetime like a test. ## Modifications * Define a system variable `CAMEL_DEBUGGER_SUSPEND` to suspend the message processing at startup * Add methods `attach` and `detach` to respectively resume and suspend message processing when `CAMEL_DEBUGGER_SUSPEND` is set to `true` * Add `junit-pioneer` as test dependency to be able to set the value of an environment variable within the context of a Unit test. * Add some doc to describe it ## Result I could debug following the steps described in [the blog post](https://camel.apache.org/blog/2022/06/HowToUseCamelRouteTextualDebuggerWithUnitTest/) without the additional `sleep` by setting the environment variable and invoking manually `attach` (will be done by https://github.com/camel-tooling/camel-debug-adapter once this PR is merged). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
