> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/ios/maps/llms.txt)

# Map Debug Options

The Mapbox Maps SDK offers some debug options which can be toggled on and off during development to troubleshoot visual map errors. These debug tools can be used to identify issues with camera orientation, tile loading, glyph and symbol collision, and more.

> **Note (warning): Debug options are for development only**
> 
> These debug options may cause performance or visual issues. They are for debugging purposes only and should not be used in any production environment.

## How to enable debug options

Developers can enable debug options by setting [`mapView`](https://docs.mapbox.com/ios/maps/api/latest/documentation/mapboxmaps/mapview/)'s [`debugOptions`](https://docs.mapbox.com/ios/maps/api/latest/documentation/mapboxmaps/mapview/debugoptions/) property with one [`MapViewDebugOption`](https://docs.mapbox.com/ios/maps/api/latest/documentation/mapboxmaps/mapviewdebugoptions/) or an array of several `MapViewDebugOptions`, like below:

**SwiftUI**

```swift
Map()
  .debugOptions([.camera, .collision, .parseStatus, .modelBounds, .padding])
```

**UIKit**

```swift
mapView.debugOptions = [.camera, .collision, .parseStatus, .modelBounds, .padding]
```

![Displays a mapView with multiple debug options enabled.](https://docs.mapbox.com/ios/assets/ideal-img/maps-guides-debug-options.f8e3da0.480.png)

## Available debug options

The following debug can be enabled or disabled at runtime and can be used together to identify issues with symbol placement, camera settings, 3D models, or other visual features.

| Debug option | Description |
| --- | --- |
| `Camera` | Shows a debug `UIView` with information about the `CameraState` including latitude, longitude, zoom, pitch, and bearing. |
| `Padding` | Draws the padding frame of the camera. |
| `Tile borders` | Draws the edges of tile boundaries as thick, red lines to help diagnose tile clipping issues. |
| `Parse status` | Each tile shows its tile coordinate (x/y/z) in the upper-left corner. |
| `Timestamps` | Each tile shows a timestamp indicating when it was loaded. |
| `Collision` | Shows the edges of glyphs and symbols as faint lines to help diagnose collision and label placement issues. |
| `Overdraw` | Replaces each drawing operation with a translucent fill. Overlapping drawing operations appear more prominent to help diagnose overdrawing. |
| `Stencil clip` | Shows the stencil buffer instead of the color buffer. |
| `Depth buffer` | Shows the depth buffer instead of the color buffer. |
| `Model bounds` | Shows 3D model bounding boxes. |
| `Light` | Each tile shows its local lighting conditions in the upper-left corner. (If `lights` properties are used, otherwise they show zero.) |

> **Related content (example): [Enable debug options](https://docs.mapbox.com/ios/maps/examples/debug-map/)**
> 
> Enable and disabled debug options on a map.