Breakpoints
Ctrl+Shift+F8
Toolbar
Item | Tooltip and shortcut | Description |
---|---|---|
Add Breakpoint Alt+Insert | Click to invoke the list of available breakpoint types and create a new breakpoint. | |
Remove Breakpoint | Click to remove the selected breakpoints. | |
Group by File | Click to display breakpoints under their respective files, rather than under their types: |
Breakpoint options
These controls depend on the selected breakpoint type.
Option | Description | Types of breakpoints |
---|---|---|
Enabled | Select this option to enable breakpoints. If you clear this option, GoLand will skip the specified breakpoints during the debugging process. | |
Suspend | Select this checkbox to suspend program when a breakpoint is hit. If the checkbox is not selected, the program is not suspended. | All types |
Condition | Select this checkbox and specify a condition for hitting a breakpoint in the text field. A condition is a Boolean expression. This expression should be valid at the line where the breakpoint is set, and is evaluated every time the breakpoint is reached. If the evaluation result is If the result is In the Condition field, press Shift+Enter to open the multiline editor. | All types |
Log message to console | Select this checkbox if you want a log message to be displayed in the console output when the breakpoint is hit. | All types |
Evaluate and log | Select this checkbox if you wish to evaluate a certain expression at this breakpoint a to export the result to the console output. Press Shift+Enter to open the multiline editor. | Line breakpoints |
Remove once hit | Select this checkbox, if the you want the breakpoint to be deleted after hitting it. | All types |
Disabled until selected breakpoint is hit | From the drop-down list, select the breakpoint in question. The option None corresponds to the always enabled breakpoint. Besides that, you can also choose the behavior of this breakpoint, when the selected one is hit:
| All types |
Speed search of a breakpoint
To find a particular breakpoint
- Start typing address or description of the target breakpoint.
GoLand highlights the line with the matching address or description.