# 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], 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)                                                                                 |         |
| `top`      | `numeric` | `false`  | The number of levels to display when dumping collections. Great to avoid dumping the entire world! Default is inifinity. (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" );

```

## Related

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