Display time in Xcode breakpoint - xcode

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?
Similar behavior
I know how to obtain such a result using Debugger Command but I want to know how to achieve it using Log Message:

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)

Xcode log time
Using Swift you are able to use #Date().debugDescription# my message (UTC time)

Related

High Precision Log Time for Chef Logs

I am starting to work with chefserver. I want to get some calculation from the logs of chefserver. However, the time stamp is displayed without milliseconds. In order to get more precise calculation I want the logs of the recipes to have milliseconds.
The logs are in the following format:
[2017-08-29T18:44:22+00:00] INFO: bash[dummyResource] ran successfully
Thanks in advance
You can change the formatter in your client.rb (or in cookbook library code but then it would only affect things after that code runs):
Chef::Log.logger.formatter = whatever
https://github.com/chef/mixlib-log/blob/master/lib/mixlib/log/formatter.rb shows the default formatter, you can subclass and tweak as you desire.

UFT does not recognize Java Security Warning

After moving on Java 1.8 there is a security warning showing on starting web-start application.
UFT can see all objects of this Java dialog by object spy. So I have coded message checking and confirmation block:
If JavaDialog("label:=Security Warning").Exist(40) Then
JavaDialog("label:=Security Warning").JavaCheckBox("text:=I accept the risk and want to run this application\.").Set True
JavaDialog("label:=Security Warning").JavaButton("label:=Run")
End If
But during test execution even 40-seconds waiting for existance of JavaDialog("label:=Security Warning") returns False right at the moment, without waiting at all.
What is the reason for this behaviour? How to fix?
It might be throwing an error in line 1 (line with if statment) in the background. and because of 'proceed to next step' option in File > Settings > Run, UFT is proceeding to next step and returning False to you.
Try moving Exist() outside the if statement.
strExist = JavaDialog("label:=Security Warning").Exist(40)
If strExist Then
JavaDialog("label:=Security Warning").JavaCheckBox("text:=I accept the risk and want to run this application\.").Set True
JavaDialog("label:=Security Warning").JavaButton("label:=Run")
End If
If UFT is not waiting for 40 seconds, then there might be an error generated in that line.
I am able to execute the below code without any issues
if JavaDialog("label:=Security Information").Exist(40) then
Msgbox "Test"
End If
What you can do to debug this is
1) Check the UFT's run result report, that will have the error generated by UFT. That will help you in identification of issues.
2) As Yogesh suggested, turn off any error settings and comment any On error resume next statements in your script. This will make sure that UFT shows you the error instead of skipping the line.

Is Parse providing 15 seconds for Cloud Code functions

I'm currently coding an app that utilizes Parse as a backend, but have run into a '124' error. I admit that I do a lot in my cloud functions, but, from what I've observed, it doesn't appear over 15 seconds. Could someone please confirm this? Below is the output.
E2015-03-06T03:49:52.644Z] v286: Ran cloud function createEvent for
user puZNjFVfSm with:
Input:
{"RSVPDate":{"__type":"Date","iso":"2015-03-06T04:49:52.000Z"},"description":"Sample event to showcase
functionality","group":{"max":5,"min":4},"max":50,"reoccur":{"day":1,"month":1,"stop":{"__type":"Date","iso":"2015-03-06T04:49:52.000Z"},"week":1},"title":"SampleFCFS"}
Failed with: Execution timed out I2015-03-06T03:49:52.716Z] begin
I2015-03-06T03:49:52.717Z] creating Event - initial checks completed
I2015-03-06T03:49:52.718Z] Finished advanced checks
I2015-03-06T03:49:52.719Z] Event creation start
I2015-03-06T03:49:52.770Z] begin event creation
I2015-03-06T03:49:52.873Z] Finding role: company_employee_z0Zx39OyuY
I2015-03-06T03:49:52.875Z] Added and secured event
I2015-03-06T03:49:52.931Z] attaching role to 425Qy9v9e4
I2015-03-06T03:49:52.934Z] Adding participant
From what I can tell, it looks like I'm only getting 300Z (is that milliseconds?) on all my runs. Shouldn't I be getting 15 seconds?
Update: I found that the issue was caused by using the addUnique function of Parse Objects with an array of pointers. By inserting ids instead of pointers, the issue was resolved.
Thank you for your help.

OAS 10g -10.1.2.3.0 forms and reports server, opmn.log is not getting updated

Hi Can you tell which way to drive the analysis for my issue opmn.log is not getting updated. All the instances are working fine and individual instances logs are getting updated but $ORACLE_HOME/opmn/logs/opmn.log is always 0kb since a week time. I could not find any statements reg opmn.log on opmn.xml.
There is a difference in Logging mechanism between (9.0.2 to 10.1.2) and (10.1.3 to later).
(9.0.2 to 10.1.2) log-file path="x" level="x" rotation-size="x"
(10.1.3 to later) log path="x" comp="x;y;z" rotation-size="x"
(9.0.2 to 10.1.2) :
ORACLE_HOME/opmn/logs/ipm.log:
Review the error codes and messages that are shown in the ipm.log file. The PM portion of OPMN generates and outputs the error messages in this file. The ipm.log file tracks command execution and operation progress. The level of detail that gets logged in the ipm.log can be modified by configuration in the opmn.xml file. Refer to Chapter 3, "opmn.xml Common Configuration" for examples of debug levels.
ORACLE_HOME/opmn/logs/ons.log:
Use the ons.log file to debug the ONS portion of OPMN or for early OPMN errors. The ONS portion of OPMN is initialized before PM, and so errors that occur early in OPMN initialization will show up in the ons.log file.
ORACLE_HOME/opmn/logs/opmn.log:
The opmn.log file contains output generated by OPMN when the ipm.log and ons.log files are not available. Typically, the only output written to the opmn.log file will be the exit status of a child OPMN process. A status code of 4 indicates a normal reload of OPMN. All other status codes indicate an abnormal termination of the child OPMN process.
ipm.log(10.1.2) similar to opmn.log(10.1.3)
ons.log(10.1.2) similar to opmn.dbg(10.1.3)

BlackBerry - how to interpret sysout console output while debugging

I'm having trouble chasing down a new bug in my BB app. I would like to gain understanding of the Console logging output that RIM provides.
Background is: I can't get it to break on simulator, so am running a JDE-4.5-compiled app on a Torch device. Using on-device debugging through Eclipse (on Windows).
Some minutes into running the app, I can get it to crash - there are lots of web service calls happening all the time, with lots of UI updates to rows in a list. When the app crashes, Eclipse does not catch the exception.
I have inspected the system log (ALT-lglg) but there are really a lot of messages in there, mostly referring to the message/event loop. However, I can find no reference to my code in them. I will further investigate the log (having downloaded it thanks to Max Gontar on Blackberry console output). However, with this current post I am asking more about the interpretation of the console output, rather than general BB debugging tips.
The output on crash is the regular popup box saying:
Uncaught exception: Application ITrack(307) is not
responding; process terminated
Question is: How do I interpret the attached console output - specifically I feel that the VM:... lines might hold some useful info, but I can find no resources with Google on their meaning?
Below the console output (separated with comments from what I already understand):
-My debug output - web service complete, JSON logged. Previous lines on console are almost all similar to this - this is the app running correctly:
Response received: 5
{"lng":"28.256607055664063","lat":"-25.828020095825195","zip_postal":"","city":"Pretoria","town":"Pretoria","road":"Alandale Street","suburb":"Elardus Park","region":"Gauteng","country":"South Africa"}
response success: 5
-CRASH!!!:
VM:ECTTv=1,w=0
Application ITrack(307) is not responding; process terminated
-These lines are somehow related to one of the errors - I see them duplicated in the device log:
[0 2]
0 2
-<SNIP> - 0 2 gets repeated 62(!) times:
0 2
3d 3501
0 2
0 2
0 2
0 2
3d 3502
0 2
-<SNIP> - 0 2 gets repeated another 31 times:
-This part gives some info on the Objects that are being used as Thread locks at the time of the crash. More info is required.
VM:THMNx=177,r=0x19965800,t=java.lang.Object
VM:THMNx=147,r=0x19966400,t=net.rim.vm.Message
VM:THMNx=177,r=0x20AC00,t=CHAR[]
VM:THMNx=147,r=0x197CD000,t=net.rim.vm.MessageQueue
VM:THMNx=138,r=0x228D8800,t=net.rim.device.cldc.io.proxyhttp.ClientProtocol
VM:THMNx=129,r=0x22718C00,t=net.rim.device.cldc.io.proxyhttp.ClientProtocol
-This part I know nothing about.
VM:THDRr=native
VM:THDLv=0
VM:ECTTv=0,w=0
-App has crashed, system is cleaning up and returning to Home Ribbon screen:
AM: Exit ITrack(307)
ApplicationManagerImpl.processExited : process process switching to background: pid=307
Process ITrack(307) cleanup started
Process ITrack(307) cleanup done
AM: Foreground is requested: net_rim_bb_ribbon_app(109)
TID:unable to execute in the app com.mix.ITrack.main.Application#1a29405e|java.lang.Object#7fbc2b0a|-1
FocusHistory: Focus gained; App ITrack; Component com.mix.ITrack.shared.mix.ui.controls.DynamicRowListField
FocusHistory: Focus lost; App ITrack; Component net.rim.device.apps.internal.ribbon.launcher.ApplicationAreaGridField
FocusHistory: Focus gained; App net_rim_bb_ribbon_app; Component net.rim.device.api.ui.component.ButtonField
AM: Foreground is set: net_rim_bb_ribbon_app(109)
ApplicationManagerImpl.setForegroundProcess : calling notifyApplicationSwitch to switch to foreground: process=net_rim_bb_ribbon_app(109) pid=109
Is there any info in here that looks useful to someone with more experience on BB than I have?
Has anyone any info on interpreting the VM:... lines?
(Please note I am not asking for general BB debugging advice, as there are already some great answers on stackoverflow about that. However I would love to this 'mysterious' RIM logging code.)
to start off: according to this BlackBerry forum answer by klyubin, the lines starting with VM:THMNx= refer to the locks being held at the time of the crash.

Resources