> For the complete documentation index, see [llms.txt](https://boxlang.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/system/dump.md).

# Dump

Outputs the contents of a variable (simple or complex) of any type for debugging purposes to a specific output location.

The available `output` locations are: - **buffer**: The output is written to the buffer, which is the default location. If running on a web server, the output is written to the browser. - **console**: The output is printed to the System console. - **Absolute File Path** The output is written to a file with the specified absolute file path.

The output `format` can be either HTML or plain text.

The default format is HTML if the output location is the buffer or a web server or a file, otherwise it is plain text for the console.

## Method Signature

```
Dump(var=[any], label=[string], depth=[numeric], maxRows=[numeric], top=[numeric], expand=[boolean], abort=[boolean], output=[string], format=[string], showUDFs=[boolean])
```

### Arguments

| Argument   | Type      | Required | Description                                                                                                                                                                                               | Default |
| ---------- | --------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `var`      | `any`     | `false`  | The variable to dump, can be any type                                                                                                                                                                     |         |
| `label`    | `string`  | `false`  | A custom label to display above the dump (Only in HTML output)                                                                                                                                            |         |
| `depth`    | `numeric` | `false`  | The recursion depth to display when dumping nested collections. 1-based: -1 (default) is unlimited, 0 shows nothing, 1 shows the top level with no recursion, 2 recurses once, etc. (Only in HTML output) |         |
| `maxRows`  | `numeric` | `false`  | The maximum number of keys/rows/items to display per level of a collection, array, or query. 1-based: -1 (default) is unlimited, 0 shows nothing, 1 shows a single row, etc. (Only in HTML output)        |         |
| `top`      | `numeric` | `false`  | Deprecated: use maxRows instead. When maxRows is not also passed, top's value is used as maxRows. Kept for backwards compatibility with existing BoxLang code. (Only in HTML output)                      |         |
| `expand`   | `boolean` | `false`  | Whether to expand the dump. Be default, we try to expand as much as possible. (Only in HTML output)                                                                                                       | `true`  |
| `abort`    | `boolean` | `false`  | Whether to do a hard abort the request after dumping. Default is false                                                                                                                                    | `false` |
| `output`   | `string`  | `false`  | The output format which can be "buffer", "console", or "{absolute file path}". The default is "buffer".                                                                                                   |         |
| `format`   | `string`  | `false`  | The format of the output to a **filename**. Can be "html" or "text". The default is according to the output location.                                                                                     |         |
| `showUDFs` | `boolean` | `false`  | Show UDFs or not. Default is true. (Only in HTML output)                                                                                                                                                  | `true`  |

## Examples

### Dump Server Scope

[Run Example](https://try.boxlang.io/?code=eJwrL8osSXUpzS3QUChOLSpLLVLQtOYCAFhRBy8%3D)

```java
writeDump( server );

```

### Additional Examples

[Run Example](https://try.boxlang.io/?code=eJwlzLEOgjAUheGdpzhhgsTIAxg2HdxZdLvCoTRpbxu4qLy9Tdz%2BfMPfdXikHaMopj1miB6wxavDwpVn3GQrkLCRxYkxqVENaS4Zc%2BAXk5jAjszqs3rjtWwavGXtHW3wkc%2BkvOucmvaEIC%2BGvh7E%2FbNGe6l%2B5%2B8tJw%3D%3D)

```java
// You can dump any thing here. Easy to see the content of complex data type
writeDump( var=getTimeZoneInfo(), label="Tag label" );

```

### Limit recursion depth

Prevents dumping deeply nested structures by limiting how many levels are recursed into. `depth` is 1-based: `-1` (the default) is unlimited, `0` shows nothing, `1` shows the top level with no recursion, `2` recurses once, etc.

```java
writeDump( var=complexObject, depth=3 );

```

### Limit the number of rows/items shown

Limits how many keys, array elements, or query rows are shown per level, independently of recursion depth. Same 1-based semantics as `depth`.

```java
writeDump( var=bigArray, maxRows=10 );

```

### Deprecated: top

`top` is deprecated in favor of `maxRows` and `depth` above. For backwards compatibility it is still accepted and, when `maxRows` is not also passed, its value is used as `maxRows`. A deprecation warning is logged when it's used.

```java
writeDump( var=bigArray, top=10 );

```

## Related

* [ApplicationRestart](/boxlang-language/reference/built-in-functions/system/applicationrestart.md)
* [ApplicationStartTime](/boxlang-language/reference/built-in-functions/system/applicationstarttime.md)
* [ApplicationStop](/boxlang-language/reference/built-in-functions/system/applicationstop.md)
* [BoxAnnounce](/boxlang-language/reference/built-in-functions/system/boxannounce.md)
* [BoxAnnounceAsync](/boxlang-language/reference/built-in-functions/system/boxannounceasync.md)
* [BoxAST](/boxlang-language/reference/built-in-functions/system/boxast.md)
* [BoxModuleReload](/boxlang-language/reference/built-in-functions/system/boxmodulereload.md)
* [BoxRegisterInterceptionPoints](/boxlang-language/reference/built-in-functions/system/boxregisterinterceptionpoints.md)
* [BoxRegisterInterceptor](/boxlang-language/reference/built-in-functions/system/boxregisterinterceptor.md)
* [BoxRegisterRequestInterceptor](/boxlang-language/reference/built-in-functions/system/boxregisterrequestinterceptor.md)
* [BoxUnregisterInterceptor](/boxlang-language/reference/built-in-functions/system/boxunregisterinterceptor.md)
* [BoxUnregisterRequestInterceptor](/boxlang-language/reference/built-in-functions/system/boxunregisterrequestinterceptor.md)
* [CallStackGet](/boxlang-language/reference/built-in-functions/system/callstackget.md)
* [CreateGUID](/boxlang-language/reference/built-in-functions/system/createguid.md)
* [CreateObject](/boxlang-language/reference/built-in-functions/system/createobject.md)
* [CreateUUID](/boxlang-language/reference/built-in-functions/system/createuuid.md)
* [DE](/boxlang-language/reference/built-in-functions/system/de.md)
* [DebugBoxContexts](/boxlang-language/reference/built-in-functions/system/debugboxcontexts.md)
* [Duplicate](/boxlang-language/reference/built-in-functions/system/duplicate.md)
* [echo](/boxlang-language/reference/built-in-functions/system/echo.md)
* [EncodeForHTML](/boxlang-language/reference/built-in-functions/system/encodeforhtml.md)
* [GetApplicationMetadata](/boxlang-language/reference/built-in-functions/system/getapplicationmetadata.md)
* [GetBaseTagData](/boxlang-language/reference/built-in-functions/system/getbasetagdata.md)
* [GetBaseTagList](/boxlang-language/reference/built-in-functions/system/getbasetaglist.md)
* [GetBaseTemplatePath](/boxlang-language/reference/built-in-functions/system/getbasetemplatepath.md)
* [GetBoxContext](/boxlang-language/reference/built-in-functions/system/getboxcontext.md)
* [GetBoxRuntime](/boxlang-language/reference/built-in-functions/system/getboxruntime.md)
* [GetBoxVersionInfo](/boxlang-language/reference/built-in-functions/system/getboxversioninfo.md)
* [GetClassMetadata](/boxlang-language/reference/built-in-functions/system/getclassmetadata.md)
* [GetComponentList](/boxlang-language/reference/built-in-functions/system/getcomponentlist.md)
* [GetContextRoot](/boxlang-language/reference/built-in-functions/system/getcontextroot.md)
* [GetCurrentTemplatePath](/boxlang-language/reference/built-in-functions/system/getcurrenttemplatepath.md)
* [GetFileFromPath](/boxlang-language/reference/built-in-functions/system/getfilefrompath.md)
* [GetFunctionCalledName](/boxlang-language/reference/built-in-functions/system/getfunctioncalledname.md)
* [GetFunctionList](/boxlang-language/reference/built-in-functions/system/getfunctionlist.md)
* [GetModuleInfo](/boxlang-language/reference/built-in-functions/system/getmoduleinfo.md)
* [GetModuleList](/boxlang-language/reference/built-in-functions/system/getmodulelist.md)
* [GetRequestClassLoader](/boxlang-language/reference/built-in-functions/system/getrequestclassloader.md)
* [GetSemver](/boxlang-language/reference/built-in-functions/system/getsemver.md)
* [GetSystemSetting](/boxlang-language/reference/built-in-functions/system/getsystemsetting.md)
* [GetTempDirectory](/boxlang-language/reference/built-in-functions/system/gettempdirectory.md)
* [GetTickCount](/boxlang-language/reference/built-in-functions/system/gettickcount.md)
* [htmlEditFormat](/boxlang-language/reference/built-in-functions/system/htmleditformat.md)
* [IIF](/boxlang-language/reference/built-in-functions/system/iif.md)
* [Invoke](/boxlang-language/reference/built-in-functions/system/invoke.md)
* [IsInstanceOf](/boxlang-language/reference/built-in-functions/system/isinstanceof.md)
* [JavaCast](/boxlang-language/reference/built-in-functions/system/javacast.md)
* [ObjectDeserialize](/boxlang-language/reference/built-in-functions/system/objectdeserialize.md)
* [ObjectSerialize](/boxlang-language/reference/built-in-functions/system/objectserialize.md)
* [PagePoolClear](/boxlang-language/reference/built-in-functions/system/pagepoolclear.md)
* [Print](/boxlang-language/reference/built-in-functions/system/print.md)
* [Println](/boxlang-language/reference/built-in-functions/system/println.md)
* [RunThreadInContext](/boxlang-language/reference/built-in-functions/system/runthreadincontext.md)
* [SessionInvalidate](/boxlang-language/reference/built-in-functions/system/sessioninvalidate.md)
* [SessionRotate](/boxlang-language/reference/built-in-functions/system/sessionrotate.md)
* [SessionStartTime](/boxlang-language/reference/built-in-functions/system/sessionstarttime.md)
* [Sleep](/boxlang-language/reference/built-in-functions/system/sleep.md)
* [SystemCacheClear](/boxlang-language/reference/built-in-functions/system/systemcacheclear.md)
* [SystemExecute](/boxlang-language/reference/built-in-functions/system/systemexecute.md)
* [SystemOutput](/boxlang-language/reference/built-in-functions/system/systemoutput.md)
* [Throw](/boxlang-language/reference/built-in-functions/system/throw.md)
* [Trace](/boxlang-language/reference/built-in-functions/system/trace.md)
* [URLDecode](/boxlang-language/reference/built-in-functions/system/urldecode.md)
* [URLEncodedFormat](/boxlang-language/reference/built-in-functions/system/urlencodedformat.md)
* [writeDump](/boxlang-language/reference/built-in-functions/system/writedump.md)
* [WriteLog](/boxlang-language/reference/built-in-functions/system/writelog.md)
* [WriteOutput](/boxlang-language/reference/built-in-functions/system/writeoutput.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/system/dump.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
