Trouble debugging unit tests of framework
Trouble debugging unit tests of framework
- Subject: Trouble debugging unit tests of framework
- From: Ben Golding <email@hidden>
- Date: Mon, 19 Apr 2010 16:21:12 +1000
I have a set of unit tests that I am using to test a framework that I'm developing.
Following Chris Hanson's blog entry (http://chanson.livejournal.com/119578.html), I have created a custom executable and am injecting the my octest code into that which is working fine insofar as the tests run correctly.
The problem I'm having is when I need to debug the unit tests and set a breakpoint in the framework code. No matter what I've tried the breakpoint is never active, it's always displayed as a yellow outline breakpoint which I understand is because Xcode doesn't think that code is loaded.
When I look at "otool -L" in the .octest bundle, I can see that it's trying to load:
@executable_path/../Frameworks/Forecaster.framework/Versions/A/Forecaster
which is my framework. I tried building the octest bundle so that it had a copy files build phase to embed the framework in the bundle but that made no difference. I backed that change out.
When I turned on the DYLD_PRINT_LIBRARIES environment var, I could see that it was loading my framework from:
dyld: loaded: /home/bgg/Build/Debug/Forecaster.framework/Versions/A/Forecaster
which was what I'd expected/hoped for.
Nonetheless, Xcode just doesn't want to enable breakpoints in the framework. Is there something that Xcode needs to see for it to recognise that a framework has been loaded?
I find managing the unit test infrastructure to be extremely frustrating and hugely distracting from the process of just getting my program to work.
Ben.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden