Buscar

Este contenido no está disponible en el idioma seleccionado.

Chapter 16. Changing Variable Values

download PDF

Overview

When the Camel debugger hits a breakpoint, the 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 editable variables displays the Change Value…​ option.

Procedure

To change the value of a variable:

  1. If necessary, start the debugger. See Chapter 14, Running the Camel Debugger.
  2. In the Variables view, select a variable whose value you want to change, and then click its Value field.

    editBPvars1

    The variable’s value field turns a lighter shade of blue, indicating that 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.

    The 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: UNITED KINGDOM).

  4. Continue stepping through the breakpoints and check whether the message is processed as expected. At each step, check the Debug view, the Variables view, and the Console output.
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.