Portlet Factory, Version 6.1.2


 

Print the value of a variable

You can use a tool available from the Action List builder to generate a System.out.println statement. A common way to debug in Java is to use the System.out.println method.

  1. If you do not already have an Action List builder in your model, add one.

  2. Add a new entry to your action list by clicking ... to the right of the text box at the position you wish to add a debugging statement.

  3. In the Select an Action box, expand the "Special" folder and select SystemOut.

  4. In the Set Argument box use the picker to drill down to the value you want to output, select it and click OK.

You can use the action list SystemOut argument to display the value of the same item multiple times throughout the action list. This allows you to trace an item's value through the entirety of program execution.

The value you display using SystemOut is displayed in the console and will look something like the following:

*--TIME: [2004-12-25] 16:07:05, 831] __* Category: bowstreet.system.debugTracing Priority: INFO Msg: SystemOut= ${Variables/varHellowWorld} =null

As you can see, an entry was placed in the action list to output the value of the varHelloWorld variable, and at this point in the program, its value is null.

Parent topic: Overview: debugging an application


Library | Support |