Reputation: 3969
In Xcode 6 I have created a breakpoint that do not interrupt the program execution to display informations.
Here is the result between results of NSLog
calls:
I now want to add a time information to this message as done by NSLog
does. How can I achieve this?
I know how to obtain such a result using Debugger Command
but I want to know how to achieve it using Log Message
:
Upvotes: 4
Views: 1928
Reputation: 34311
Xcode log time
Using Swift you are able to use @Date().debugDescription@ my message
(UTC time)
Upvotes: 4
Reputation: 2491
As you can see in the hints: @exp@
so you can write this:
@[NSDate date]@ - some additional message
Output will be:
2018-06-28 14:06:45 UTC - some additional message
(works only for the 'Log Message' type)
Upvotes: 6