このコンテンツは選択した言語では利用できません。

Chapter 17. Changing Variable Values


Overview

When the Camel debugger hits a breakpoint, Variables view displays the values of all variables available at that point in the routing context. Some variables are editable, allowing you to change their value. This enables you to see how the application handles changes in program state.
Note
Not all variables are editable. The context menu of those that are displays the option, Change Value....

Procedure

To change the value of a variable:
  1. If necessary, start up the debugger. See Chapter 15, Starting the Camel Debugger.
  2. In Variables view, select a variable whose value you want to change, and then click its Value field.
    The variable's value field turns a lighter shade of blue, indicating it is in edit mode.
    Note
    Alternatively, you can right-click the variable to open its context menu, and select Change Value... to edit its value.
  3. Enter the new value and then click Enter.
    Console view displays an INFO level log entry noting the change in the variable's value (for example, Breakpoint at node to1 is updating message header on exchangeId: ID-dhcp-97-16-bos-redhat-com-52574-1417298894070-0-2 with header: Destination and value: ChangedTarget).
  4. Continue stepping through the breakpoints and check whether the message is processed as expected. At each step, check Debug view, Variables view, and the Console output.

Related topics

Chapter 19, Disabling Breakpoints in a Running Context
Chapter 18, Adding Variables to the Watch List
chapter "To Debug a Routing Context" in "Tooling Tutorials"
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.