Breakpoints

Breakpoints work in Enterprise Architect much like in any other debugger. Adding a breakpoint notifies the debugger to trap code execution at the point you have specified. When a breakpoint is encountered by a thread of the application being debugged, the source code is displayed in an editor window, and the line of code where the breakpoint occurred is highlighted.

Selecting a different package in the project affects which breakpoints are displayed.

Note:

The debugger does not stop automatically. It runs to completion unless it encounters a breakpoint.

An Enterprise Architect model maintains breakpoints for every package having a Build Script - Debug command. Breakpoints themselves are listed in their own Breakpoints window (View | Debug & Profile | Breakpoints).

debug_tab_breakpoints

Breakpoints are also displayed in an abbreviated form in the Breakpoints folder on the Debug window ([Alt]+[8]).

DebuggerMiniBreakView

Breakpoints are maintained in a file according to the format:

path\prefix_username.brkpt

where:

  • path         =        The default working directory specified in your Build Script
  • prefix         =        Tree View Node Name / Package name
  • username         =        Host system username of the Enterprise Architect user.

Breakpoint States

DEBUGGER STATE

 

Running

Not running

active_breakpoint

Bound

Enabled

disabled_breakpoint

Disabled

Disabled

unbound_breakpoint

Not bound - this usually means that the DLL is not yet loaded or was not built with debug information

N/a

failed_breakpoint

Failed - this usually means a break could not be set at this time, and can occur when the source file is newer or older than that used to build the application.

N/a

Add Breakpoints

To set breakpoints for a code segment:

  1. Open the model code to debug.
  2. Find the appropriate code line and click in the left margin column. A solid red circle in the margin indicates that a breakpoint has been set at that position.

adding_breakpoint

If the code is currently halted at a breakpoint, that point is indicated by a blue arrow next to the marker.

AtBreakpoint

Delete, Disable and Enable Breakpoints

To delete a specific breakpoint, either:

  • If the breakpoint is enabled, click on the red breakpoint circle in the left margin of the Source Code Editor
  • Right-click on the breakpoint marker in the editor and select the appropriate context menu option, or
  • Select the breakpoint in the Breakpoints tab and press [Delete].

You can also delete all breakpoints by clicking on the Delete all breakpoints button on the Breakpoints window toolbar (Delete Breakpoints).

To disable a breakpoint, deselect its checkbox on the Breakpoints window or, to disable all breakpoints, click on the Disable all breakpoints button in the toolbar (Disable all breakpoints). The breakpoint is then shown as an empty grey circle. Select the checkbox or use the Enable all breakpoints button to enable it again (Enable all breakpoints).