Patrick-Kladek/CocoaDebugKit
소개
디버깅을 간편하게. 사용자 지정 객체의 QuickLook 이미지를 자동으로 생성합니다.
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalCocoaDebugKit
Debugging made easy. Automatically create QuickLook images of custom objects.
This project helps developers to visualize custom objects and will therefore speed up your development process.
Lets say we have a custom Object called "Person" and want to inspect all variables in Xcode. This will look something like that:

With CocoaDebugKit it will look like this:

So how can we achieve this goal? It´s easy just add this Framework to your Project and implement this method in your custom object:
#import "Person.h"
#import <CocoaDebugKit/CocoaDebugKit.h>
@implementation Person
- (id)debugQuickLookObject
{
return [CocoaDebugView debugViewWithAllPropertiesOfObject:self includeSuperclasses:YES];
}
@end
After that set a breakpoint in your code, select an object you want to inspect and hit space. This will open a small quicklook popover with the contents of your object.
Requirements
- macOS 10.9+
- iOS 8+
- Xcode 11+
Installation
The prefered way to use CocoaDebugKit is via Carthage. Simply add this line to your cartfile:
github "Patrick-Kladek/CocoaDebugKit"
and run:
carthage update --platform ios
Known Limitations
- NSObject rootclass required
- Cocoa Runtime
Both of these limitations don't prevent you from using CocoaDebugKit. You can always create the debugView manually:
- (id)debugQuickLookObject
{
CocoaDebugView *view = [CocoaDebugView debugView];
[view addLineWithDescription:@"Image:" image:self.image];
[view addLineWithDescription:@"First Name:" string:self.firstName];
[view addLineWithDescription:@"Last Name:" string:self.lastName];
[view addLineWithDescription:@"Birthday" date:self.birthday];
return view;
}
Note
On iOS returning a UIView subclass to QuickLook may result in an empty preview. To fix this simply return an image.
return [[CocoaDebugView debugViewWithAllPropertiesOfObject:self includeSuperclasses:YES] imageRepresentation];
관련 프로젝트 살펴보기
불러오는 중…