---
title: "hv_vcpu_get_trap_debug_exceptions(_:_:)"
framework: Hypervisor
role: symbol
role_heading: Function
platforms: [macOS 11.0+]
path: "hypervisor/hv_vcpu_get_trap_debug_exceptions(_:_:)"
---

# hv_vcpu_get_trap_debug_exceptions(_:_:)

Gets whether debug exceptions exit the guest.

## Declaration

```swift
func hv_vcpu_get_trap_debug_exceptions(_ vcpu: hv_vcpu_t, _ value: UnsafeMutablePointer<Bool>) -> hv_return_t
```

## Parameters

- `vcpu`: The instance of the vCPU.
- `value`: Indicates whether debug exceptions in the guest trap to the host on output.

## Return Value

Return Value HV_SUCCESS if the operation was successful, otherwise an error code specified in hv_return_t.

## Discussion

Discussion The equivalent system register is MDCR_EL2.TDE. important: This function must be called by the owning thread.

## See Also

### Trap configuration

- [hv_vcpu_set_trap_debug_exceptions(_:_:)](hypervisor/hv_vcpu_set_trap_debug_exceptions(_:_:).md)
- [hv_vcpu_get_trap_debug_reg_accesses(_:_:)](hypervisor/hv_vcpu_get_trap_debug_reg_accesses(_:_:).md)
- [hv_vcpu_set_trap_debug_reg_accesses(_:_:)](hypervisor/hv_vcpu_set_trap_debug_reg_accesses(_:_:).md)
