---
title: "Introduction"
canonical: "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/DebuggingMagmaCode/introduction.html"
source: "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/DebuggingMagmaCode/introduction.md"
part: "The Magma Language"
chapter: "Debugging Magma Code"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "The Magma Language", "source": "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/index-magma-language.md"}
  - {"title": "Debugging Magma Code", "source": "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/DebuggingMagmaCode/index-debugging-magma-code.md"}
prev: {"title": "Debugging Magma Code", "source": "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/DebuggingMagmaCode/index-debugging-magma-code.md"}
next: {"title": "Using the Debugger", "source": "https://docs.magma-maths.org/v2.30-1/MagmaLanguage/DebuggingMagmaCode/using-debugger.md"}
intrinsics:
  - {"name": "SetDebugOnError", "signature": "SetDebugOnError(f): BoolElt"}
---

# Introduction

In order to facilitate the debugging of complex pieces of Magma code, Magma includes a debugger. *This debugger is very much a prototype, and can cause Magma to crash.*

<a id="procedure-setdebugonerror-boolelt"></a>
## `SetDebugOnError(f): BoolElt`

If $f$ is `true`, then upon an error Magma will break into the debugger. The usage of the debugger is described in the next section.
