| Start |
|---|
| dump
Detailed view of an array: Prints: ▿ 4 elements For a dictionary: Prints: ▿ 3 key/value pairs
The first parameter has no label. There's other parameters available, like Prints: ▿ mirroring: 3 key/value pairs You can also choose to print only a certain number of items with |
| Debug Print Debug Print shows the instance representation that is most suitable for debugging. Yields This extra information can be very important, for example: Yields Notice how in the first output it appears that there are 4 elements in the array as opposed to 3. For reasons like this, it is preferable when debugging to use Updating a classes debug and print values |
| print() vs dump() Many of us start debugging with simple and we have an instance of When we run the while As seen, Therefore, With While There is more info on the class with |
| print vs NSLog In swift we can use both But there are lot of differences in 1 TimeStamp: Output: [1, 2, 3, 4, 5] It'll also print ProjectName along with timestamp. 2 Only String: 3 Performance: 4 Synchronization: 5 Device Console: Remarks
Sources: https://developer.apple.com/library/content/technotes/tn2347/_index.html (opens new window) http://ericasadun.com/2015/05/22/swift-logging/ (opens new window) |
Read Article
https://develop.horje.com/learn/1434/reference