debugPrint

@inline(never) func debugPrint<T>(_: T)

Write to the console the textual representation of x most suitable for debugging.

  • If T conforms to DebugPrintable, write x.debugDescription
  • Otherwise, if T conforms to Printable, write x.description
  • Otherwise, if T conforms to Streamable, write x
  • Otherwise, fall back to a default textual representation.

See also: debugPrintln(x)

Declaration

@inline(never) func debugPrint<T>(x: T)
@inline(never) func debugPrint<T, TargetStream : OutputStreamType>(_: T, inout: TargetStream)

Write to target the textual representation of x most suitable for debugging.

  • If T conforms to DebugPrintable, write x.debugDescription
  • Otherwise, if T conforms to Printable, write x.description
  • Otherwise, if T conforms to Streamable, write x
  • Otherwise, fall back to a default textual representation.

See also: debugPrintln(x, &target)

Declaration

@inline(never) func debugPrint<T, TargetStream : OutputStreamType>(value: T, inout target: TargetStream)