iPhone – How do Xcode know which project wants to debug when multiple projects open?

TL; DR version:

This problem occurs because I have multiple frames (I have already built) and one that uses the frame Client project. Now, when I open the client project and try to debug to the framework, it doesn’t work.

However, if I open the project associated with the framework, then debugging seems to be possible (despite Some weird breakpoint issues I can’t see are triggered).

I checked Apple’s documentation, maybe the answer is hidden somewhere, but I can’t find it in the Xcode debugging guide.

Long version:

The reason this question is important to me is that my colleagues and I have disagreements on how to import headers in the framework we built.

I Prefer to use frame headers (using client applications):

#import "FrameworkA/HeaderA.h"
#import "FrameworkB/HeaderB.h"< /pre>

On the other hand, he likes to import the frame header (using a client application), as shown below:

#import "HeaderA.h"
#import "HeaderB.h"

And specify the header search path in the build target of the client application.

What further complicates the problem is that these frameworks Some of them are interdependent. For example, FrameworkB has the header of FrameworkA referenced in its format:

#import "HeaderA.h"

He The argument for this is that debugging is only effective when we import header files in this way. I think there will be a relationship between header import style and debugging, which seems suspicious, but I'm not sure how XCode is in the debugging process Select the file to link, so the question.

Thank you in advance for any help with this query.

You add the project reference to the target and make sure that Xcode knows where to find the debugging symbols.

#import  

This is the way to go (internal and external declarations). Why? With the development of the library, the other method is more likely to cause problems. Additional qualifications disambiguate any situation (unless you have two FrameworkA/s in your search path), and it is better to clearly limit the file now, and Not when your customers tell you that they cannot use your library with other libraries, or they can only use them under certain conditions. Then you have to solve the problem and reinstall (there is a way for this kind of thing to happen without Convenient time = p). This is a simple measure to ensure that you develop a powerful interface.

Perhaps the most important part that people overlook is the location of the product: use a custom central build location for the target – Many people use the default location, which is xcodeproject. Otherwise, Xcode may not be able to find debugging information.

Finally, debugging complex projects in Xcode can be very...let’s call it "problem". So, even You have configured everything correctly, and don’t expect a perfect debugging experience. There are more reasons to use Xcode to integrate assertions and unit tests into the development cycle early in the development cycle. The truth is that no matter how hard you try, the debugger may be useless – it’s not A new question. I hope LLDB can improve our debugging experience.

Good luck

TL; DR version:

This problem arises because I have multiple frameworks (I have already built) and a client project that uses said framework. Now, when I open the client project and try to debug to the framework, it doesn't work .

However, if I open the project associated with the framework, debugging seems to be possible (although there are some strange breakpoint issues I can't see being triggered).

I check I found Apple’s documentation, maybe the answer is hidden somewhere, but I can’t find it in the Xcode debugging guide.

Long version:

The reason why this question is important to me Yes, my colleagues and I disagree on how to import headers in the framework we build.

I tend to use the frame title (using the client application):

#import "FrameworkA/HeaderA.h"
#import "FrameworkB/HeaderB.h"

On the other hand, he likes to import frame headers (using client applications), As shown below:

#import "HeaderA.h"
#import "HeaderB.h"

and in the client application Specify the header search path in the build target.

What further complicates the problem is that some of these frameworks are interdependent. For example, FrameworkB has the header of FrameworkA referenced in its format:

#import "HeaderA.h"

The argument that he does this is to debug only It only works when we import header files in this way. I think there will be a relationship between header import style and debugging, which seems suspicious, but I am not sure how XCode chooses the file to link during debugging, so Question.

Thank you in advance for any help with this query.

You add the project reference to the target and make sure that Xcode knows that Where to find the debugging symbols.

#import 

This is the way to go (internal and external declaration) .reason? With the development of the library, the other method is more likely to cause problems. Additional qualifications disambiguate any situation (unless you have two FrameworkA/s in your search path), and it is better to clearly limit the file now, and Not when your customers tell you that they cannot use your library with other libraries, or they can only use them under certain conditions. Then you have to solve the problem and reinstall (there is a way for this kind of thing to happen without Convenient time = p). This is a simple measure to ensure that you develop a powerful interface.

Perhaps the most important part that people overlook is the location of the product: use a custom central build location for the target – Many people use the default location, which is xcodeproject. Otherwise, Xcode may not be able to find debugging information.

Finally, debugging complex projects in Xcode can be very...let’s call it "problem". So even You have configured everything correctly, and don’t expect a perfect debugging experience. There are more reasons to use Xcode to integrate assertions and unit tests into the development cycle early in the development cycle. The truth is that no matter how hard you try, the debugger may be useless – it’s not A new question. I hope LLDB can improve our debugging experience.

Good luck

Leave a Comment

Your email address will not be published.