Debugging Cocoa application unit tests (XCode 3)
Debugging Cocoa application unit tests (XCode 3)
- Subject: Debugging Cocoa application unit tests (XCode 3)
- From: Felix Franz <email@hidden>
- Date: Fri, 9 Nov 2007 15:01:43 +0100
Hi,
In Tiger I used the method described by Chris Hanson <http://chanson.livejournal.com/120740.html
>
to debug my unit-tests (build as a bundle). It worked like a charm. In
Leopard I changed
the environment variables to
DYLD_INSERT_LIBRARIES=$(DEVELOPER_LIBRARY_DIR)/PrivateFrameworks/
DevToolsBundleInjection.framework/DevToolsBundleInjection
XCInjectBundle=$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/Tests.octest
and added
DYLD_FALLBACK_FRAMEWORK_PATH=$(DEVELOPER_LIBRARY_DIR)/Frameworks:$
(DEVELOPER_LIBRARY_DIR)/PrivateFrameworks
Choosing "Debug" now shows the following error in the debug console:
warning: The target crashed on startup, maybe the shell is crashing.
"Try set start-with-shell 0" to workaround.
I unchecked "Start executable after starting debugger" (Executable
info) and used the proposed statement:
(gdb) set start-with-shell 0
(gdb) run
and I am able to debug the tests. Is it possible to automatically
insert these statements, or better yet: another environment variable
to set? It is a little bit tedious to always enter those lines ...
thanks in advance,
felix
_______________________________________________
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