# debug statement

The debug statement temporarily suspends
execution of a FlashBASIC or BASIC program and invokes the FlashBASIC
or BASIC debugger.

## Syntax

```
debug
```

## Description

The program can also be run
with the d option, or, if cataloged, activated with
a d option.

The g command
in the FlashBASIC or BASIC debugger returns control to the FlashBASIC
or BASIC program and continues execution at the next executable statement
in the program.

## Example(s)

```
crt ’command ’:
input response
if response = "d" then debug
```

## See also

- [? command (FlashBASIC Debugger)](https://d3codex.com/flashbasicdebugger/question-command-flashbasic-debugger/)
- [b command (FlashBASIC Debugger)](https://d3codex.com/flashbasicdebugger/b-command-flashbasic-debugger/)
- [BASIC/FlashBASIC Debugger](https://d3codex.com/flashbasicdebugger/basic-flashbasic-debugger/)
- [break statement](https://d3codex.com/pickbasic-flashbasic/break-statement/)
- [break-key command](https://d3codex.com/tcl/break-key-command/)
- [break-key-off macro](https://d3codex.com/tcl/break-key-off-macro/)
- [break-key-on macro](https://d3codex.com/tcl/break-key-on-macro/)
- [brk-debug command](https://d3codex.com/tcl/brk-debug-command/)
- [brk-level command](https://d3codex.com/tcl/brk-level-command/)
- [catalog command](https://d3codex.com/tcl/catalog-command/)
- [d command (FlashBASIC Debugger)](https://d3codex.com/flashbasicdebugger/d-command-flashbasic-debugger/)
- [end command (FlashBASIC Debugger)](https://d3codex.com/flashbasicdebugger/end-command-flashbasic-debugger/)
- [execute statement (UNIX)](https://d3codex.com/pickbasic-flashbasic/execute-statement-unix/)
- [debug command (FlashBASIC Debugger)](https://d3codex.com/flashbasicdebugger/debug-command-flashbasic-debugger/)
- [k command](https://d3codex.com/flashbasicdebugger/k-command/)
- [off command (FlashBASIC Debugger)](https://d3codex.com/flashbasicdebugger/off-command-flashbasic-debugger/)
- [run command](https://d3codex.com/tcl/run-command/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [edit command (BASIC/FlashBASIC Debugger)](https://d3codex.com/flashbasicdebugger/edit-command-basic-flashbasic-debugger/)

---
Source: https://d3codex.com/pickbasic-flashbasic/debug-statement/ - part of the D3Codex reference.
