Constant

# DebugBuild

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

## Description

Used to determine whether the current operating environment is the IDE. <span class="title-ref">DebugBuild</span> is `True</api/language/true>` when you compile the project by clicking the Run button in the Toolbar.

## Usage

``` xojo
result = DebugBuild
```

| Part   | Type                               | Description                                                                   |
|--------|------------------------------------|-------------------------------------------------------------------------------|
| result | `Boolean</api/data_types/boolean>` | `True</api/language/true>` if the application is running within the debugger. |

## Sample code

The following example displays a message box only when the app is run from the IDE.

``` xojo
#If DebugBuild Then
  ' Do extra logging
  System.DebugLog("App Start")
#EndIf
```

## Compatibility

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

<div class="seealso">

`XojoVersion</api/language/xojoversion>`, `XojoVersionString</api/language/xojoversionstring>`, `TargetBigEndian</api/compiler_directives/targetbigendian>`, `TargetDesktop</api/compiler_directives/targetdesktop>`, `TargetLinux</api/compiler_directives/targetlinux>`, `TargetLittleEndian</api/compiler_directives/targetlittleendian>`, `TargetMachO</api/compiler_directives/targetmacho>`, `TargetMacOS</api/compiler_directives/targetmacos>`, `TargetWindows</api/compiler_directives/targetwindows>`, `TargetX86</api/compiler_directives/targetx86>` constants; `＃If...＃EndIf</api/compiler_directives/if...endif>` statement.

</div>
