Xcode non-value debugging

I am completely at a dead end. I have been debugging for more than a year and had this problem only if Release was installed for the assembly configuration. I have a configuration setting for Debug, and I checked to make sure that I am bound to the correct process, and yet I still don't see the value while passing the code. Has anyone else encountered this problem?

Here is a screenshot:

enter image description here

The value is returned, but I cannot see the values ​​of ANYTHING in this method or any other method, and I cannot understand why.

Thanks for any tips you can give me.

============================= UPDATE ====================== ==============

I tried to print the value and I get the result:

enter image description here

Please note that the value in the Variables view is correct for the result, although I cannot print it. But other values, such as filePath, should not be nil.

This is so strange.

============================= UPDATE ====================== ==============

I put a breakpoint on the return statement and still no luck:

enter image description here

This time I do not see the value for the result:

enter image description here

+8
objective-c xcode
Jun 05 '14 at 4:07
source share
4 answers

I ran into the same problem. In the Mouseover and Observation sections, for each variable, it showed the value nil, but while NSLog printed the correct value for these variables.

now it is fixed. try it

Go to the product menu> Scheme> Change Scheme or + <

In Run, go to the "Information" tab, change the build configuration to "debug". Hope this works.

Follow the same

+7
Mar 05 '15 at 6:24
source share
— -

@Lucy, ideally you do not need to run the “Vacation” profile during debugging, “Release” means the distribution profile of the application with a small package size and small / missing debugging symbols.

But if you must debug the release (for example, due to the environment, data reasons), make sure that the Optimization is set to No for the release.

Optimization level

You can achieve the configuration above:

1) Project settings - affects all goals project wide

2) Target - affects only one goal Target specific

Remember to switch this back before the App Store is distributed. Lower optimization will create a higher ipk, increasing the load time of your users - potential dSYM is also generated.

Background

In context, Debug, Adhoc, or Release profiles are used exclusively for the different layout configurations that Xcode comes with. Xcode runs projects with a debug profile without optimization (and another predefined configuration related to development and debugging), so you can load characters using the interpreter - you can configure it as you want.

Theoretically, you can set the release build profile, which is identical to Debug.

+9
04 Oct '14 at 5:47
source share

I see part of your problem. notice how self nil ?

This means that you are in a method call for an object with the selected object selected. Enable NSZombies for debugging.

see this SO answer how to enable NSZombie

Given that it has the right to send nil messages to objective-C, I suspect that the object is being freed as a side effect of calling doesLicenseFileExist or another thread.

You may find it useful to set a breakpoint in the IDLicenseCommand -dealloc method.

+1
Jun 05 '14 at
source share

I had this problem and it became "Link Time Optimization" from "Incremental" to "No" and solved the debugging problem.

0
Feb 05 '18 at 19:52
source share



All Articles