Trace Statements

A Trace Statement is a message that is output during execution of a debug session. Trace statements can be defined in Enterprise Architect without requiring any changes to your application source code.

Tracepoint Markers are set in the code editor. Like breakpoints, they are placed on a line of code. When that line of code executes, the debugger evaluates the statement which is logged to the Debug window. (or to file if overridden by the Analyzer script)

Add a Tracepoint Marker



See also


Open the source code to debug in the source code editor.

Editing Source Code


Find the appropriate code line, right-click in the left margin and select the 'Add Tracepoint Marker' option.

If a marker is already there, press Ctrl+click to show the Breakpoint Properties window.

Breakpoint Properties


Ensure the 'Trace statement' checkbox is selected.


In the text field below the 'Trace statement' checkbox, type the required Trace statement.

Specifying a Trace Statement


Click on the OK button. A Tracepoint Marker is shown in the left margin of the code editor.

Specifying a Trace Statement

A trace statement can be any freeform text. The value of any variables currently in scope can also be included in a trace statement by prefixing the variable name with a special token. The available tokens are:

  • $ - when the variable is to be interpreted as a string
  • @ - when the variable is a primitive type (int, double, char)

Using the example in the image above, we could output the number of people getting off a train by using this statement:

There were @Passengers before @PeopleOFF got off the train at $Arriving.Name Station


  • Trace statements can be included on any type of breakpoint or marker.

Access The source code editor. Press Ctrl+E on a class element.

Analyzer | Breakpoints and Markers

Learn more

Learning Center topics

  • Alt+F1 | Enterprise Architect | Build and Debug | Debug | Add Tracepoint