This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Indicates whether the app is running from Xcode or | |
| /// the debugger had been attached to a running app from Finder | |
| static var isDebuggerAttached: Bool { | |
| var debuggerIsAttached = false | |
| var name: [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()] | |
| var info = kinfo_proc() | |
| var info_size = MemoryLayout<kinfo_proc>.size | |
| let success = name.withUnsafeMutableBytes { (nameBytePtr: UnsafeMutableRawBufferPointer) |
OlderNewer