Keyword

# Break

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

When running in the IDE, <span class="title-ref">Break</span> causes the compiler to <span class="title-ref">Break</span> into the debugger. In a compiled app, it has no effect.

## Usage

``` xojo
Break 
```

## Notes

The <span class="title-ref">Break</span> keyword has the same effect as setting a breakpoint in the Code Editor. <span class="title-ref">Break</span> statements are ignored in built apps.

## Sample code

Display the debugger when the loop counter reaches 5:

``` xojo
For i As Integer = 1 To 10
  If i = 5 Then Break ' Display debugger when i reaches 5
Next
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Function</api/language/function>`, `Sub</api/language/sub>` statements.

</div>
