---
title: os_trace_debug_enabled()
framework: os
role: symbol
role_heading: Function
platforms: [iOS 8.0+, iPadOS 8.0+, Mac Catalyst 13.1+, macOS 10.10+, tvOS 8.0+, visionOS 1.0+, watchOS 2.0+]
path: os/os_trace_debug_enabled()
---

# os_trace_debug_enabled()

Returns whether debug level trace information is enabled.

## Declaration

```swift
func os_trace_debug_enabled() -> Bool
```

## Discussion

Discussion Generally, trace points should not involve expensive operations, however some circumstances warrant it.  Use this function to do expensive work only when debug level trace messages are enabled.

## See Also

### Deprecated Functions

- [os_trace_info_enabled()](os/os_trace_info_enabled().md)
- [os_trace_type_enabled(_:)](os/os_trace_type_enabled(_:).md)
