Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DeveloperLx/LxDBAnything
Automate box any value! Print log without any format control symbol! Change debug habit thoroughly!
https://github.com/DeveloperLx/LxDBAnything
Last synced: 6 days ago
JSON representation
Automate box any value! Print log without any format control symbol! Change debug habit thoroughly!
- Host: GitHub
- URL: https://github.com/DeveloperLx/LxDBAnything
- Owner: DeveloperLx
- License: mit
- Created: 2015-10-23T17:41:24.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-09T00:48:49.000Z (over 7 years ago)
- Last Synced: 2024-04-24T19:01:24.151Z (8 months ago)
- Language: Objective-C
- Homepage:
- Size: 30.3 KB
- Stars: 429
- Watchers: 12
- Forks: 56
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - LxDBAnything - Automate box any value! Print log without any format control symbol! Change debug habit thoroughly! (Logging / Other Hardware)
- awesome-ios-star - LxDBAnything - Automate box any value! Print log without any format control symbol! Change debug habit thoroughly! (Logging / Other Hardware)
- Awesome-iOS - LxDBAnything - Automate box any value! Print log without any format control symbol! (Foundation)
README
# LxDBAnything
Automate box any value! Print log without any format control symbol! Change debug habit thoroughly!### Installation
You only need drag LxDBAnything.h to your project.### Podfile
pod 'LxDBAnything', '~> 1.1.1'### Support
Minimum support iOS version: iOS 6.0### Usage
```objc
#import "LxDBAnything.h"id obj = self.view;
LxDBAnyVar(obj);CGPoint point = CGPointMake(12.34, 56.78);
LxDBAnyVar(point);CGSize size = CGSizeMake(87.6, 5.43);
LxDBAnyVar(size);CGRect rect = CGRectMake(2.3, 4.5, 5.6, 7.8);
LxDBAnyVar(rect);NSRange range = NSMakeRange(3, 56);
LxDBAnyVar(range);CGAffineTransform affineTransform = CGAffineTransformMake(1, 2, 3, 4, 5, 6);
LxDBAnyVar(affineTransform);UIEdgeInsets edgeInsets = UIEdgeInsetsMake(3, 4, 5, 6);
LxDBAnyVar(edgeInsets);SEL sel = @selector(viewDidLoad);
LxDBAnyVar(sel);Class class = [UIBarButtonItem class];
LxDBAnyVar(class);NSInteger i = 231;
LxDBAnyVar(i);CGFloat f = M_E;
LxDBAnyVar(f);BOOL b = YES;
LxDBAnyVar(b);char c = 'S';
LxDBAnyVar(c);CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB();
LxDBAnyVar(colorSpaceRef);// ......
LxPrintAnything(You can use macro LxPrintAnything() print any without quotation as you want!);
LxPrintf(@"Print format string you customed: %@", LxBox(affineTransform));
NSLog(@"Even use general NSLog function to print: %@", LxBox(edgeInsets));
LxPrintf(@"The type of obj is %@", LxTypeStringOfVar(obj));
LxPrintf(@"The type of point is %@", LxTypeStringOfVar(point));
LxPrintf(@"The type of size is %@", LxTypeStringOfVar(size));
LxPrintf(@"The type of rect is %@", LxTypeStringOfVar(rect));
LxPrintf(@"The type of range is %@", LxTypeStringOfVar(range));
LxPrintf(@"The type of affineTransform is %@", LxTypeStringOfVar(affineTransform));
LxPrintf(@"The type of edgeInsets is %@", LxTypeStringOfVar(edgeInsets));
LxPrintf(@"The type of class is %@", LxTypeStringOfVar(class));
LxPrintf(@"The type of i is %@", LxTypeStringOfVar(i));
LxPrintf(@"The type of f is %@", LxTypeStringOfVar(f));
LxPrintf(@"The type of b is %@", LxTypeStringOfVar(b));
LxPrintf(@"The type of c is %@", LxTypeStringOfVar(c));
LxPrintf(@"The type of colorSpaceRef is %@", LxTypeStringOfVar(colorSpaceRef));// ......
TestModel * testModel = [[TestModel alloc]init];
testModel.array = @[@1, @"fewfwe", @{@21423.654:@[@"fgewgweg", [UIView new]]}, @YES];
testModel.dictionary = @{@YES:@[[UITableViewCell new], @"fgewgweg", @-543.64]};
testModel.set = [NSSet setWithObjects:@NO, @4.325, @{@"fgewgweg":[UIView new]}, nil];
testModel.orderSet = [NSOrderedSet orderedSetWithObjects:@{@21423.654:@[@"fgewgweg", [UIView new]]}, @1, @"fewfwe", @YES, nil];LxDBObjectAsJson(testModel);
LxDBObjectAsXml(testModel);
LxDBViewHierarchy(self.view.window);// Run your application and you'll see:
๐-[ViewController viewDidLoad] + 24๐ obj = >
๐-[ViewController viewDidLoad] + 27๐ point = NSPoint: {12.34, 56.780000000000001}
๐-[ViewController viewDidLoad] + 30๐ size = NSSize: {87.599999999999994, 5.4299999999999997}
๐-[ViewController viewDidLoad] + 33๐ rect = NSRect: {{2.2999999999999998, 4.5}, {5.5999999999999996, 7.7999999999999998}}
๐-[ViewController viewDidLoad] + 36๐ range = NSRange: {3, 56}
๐-[ViewController viewDidLoad] + 39๐ affineTransform = CGAffineTransform: {{1, 2, 3, 4}, {5, 6}}
๐-[ViewController viewDidLoad] + 42๐ edgeInsets = UIEdgeInsets: {3, 4, 5, 6}
๐-[ViewController viewDidLoad] + 45๐ sel = viewDidLoad
๐-[ViewController viewDidLoad] + 48๐ class = UIBarButtonItem
๐-[ViewController viewDidLoad] + 51๐ i = 231
๐-[ViewController viewDidLoad] + 54๐ f = 2.718281828459045
๐-[ViewController viewDidLoad] + 57๐ b = YES
๐-[ViewController viewDidLoad] + 60๐ c = S
๐-[ViewController viewDidLoad] + 63๐ colorSpaceRef = 0x7ff8ba706da0
๐-[ViewController viewDidLoad] + 67๐ You can use macro LxPrintAnything() print any without quotation as you want!
๐-[ViewController viewDidLoad] + 69๐ Print format string you customed: CGAffineTransform: {{1, 2, 3, 4}, {5, 6}}
2015-11-23 15:40:25.639 LxDBAnythingDemo[12699:198689] Even use normal NSLog function to print: UIEdgeInsets: {3, 4, 5, 6}
๐-[ViewController viewDidLoad] + 73๐ The type of obj is UIView
๐-[ViewController viewDidLoad] + 74๐ The type of point is CGPoint
๐-[ViewController viewDidLoad] + 75๐ The type of size is CGSize
๐-[ViewController viewDidLoad] + 76๐ The type of rect is CGRect
๐-[ViewController viewDidLoad] + 77๐ The type of range is NSRange
๐-[ViewController viewDidLoad] + 78๐ The type of affineTransform is CGAffineTransform
๐-[ViewController viewDidLoad] + 79๐ The type of edgeInsets is LxEdgeInsets
๐-[ViewController viewDidLoad] + 80๐ The type of class is Class
๐-[ViewController viewDidLoad] + 81๐ The type of i is long
๐-[ViewController viewDidLoad] + 82๐ The type of f is double
๐-[ViewController viewDidLoad] + 83๐ The type of b is BOOL
๐-[ViewController viewDidLoad] + 84๐ The type of c is char
๐-[ViewController viewDidLoad] + 85๐ The type of colorSpaceRef is pointer
๐-[ViewController viewDidLoad] + 95๐ = {
"affineTransform" : "CGAffineTransform: {{0, 0, 0, 0}, {0, 0}}",
"orderSet" : [
{
"21423.654" : [
"fgewgweg",
">"
]
},
"1",
"fewfwe"
],
"dictionary" : {
"1" : [
">",
"fgewgweg",
"-543.64"
]
},
"flt" : "0",
"chr" : "0",
"size" : "NSSize: {0, 0}",
"edgeInsets" : "UIEdgeInsets: {0, 0, 0, 0}",
"set" : [
"0",
"4.325",
{
"fgewgweg" : ">"
}
],
"bl" : "0",
"point" : "NSPoint: {0, 0}",
"array" : [
"1",
"fewfwe",
{
"21423.654" : [
"fgewgweg",
">"
]
},
"1"
],
"range" : "NSRange: {0, 0}",
"integer" : "0",
"rect" : "NSRect: {{0, 0}, {0, 0}}"
}
๐-[ViewController viewDidLoad] + 96๐ =
affineTransform
CGAffineTransform: {{0, 0, 0, 0}, {0, 0}}
array
1
fewfwe
21423.654
fgewgweg
<UIView: 0x7ff8ba7114e0; frame = (0 0; 0 0); layer = <CALayer: 0x7ff8ba70c680>>
1
bl
0
chr
0
dictionary
1
<UITableViewCell: 0x7ff8ba7117e0; frame = (0 0; 320 44); layer = <CALayer: 0x7ff8ba711d20>>
fgewgweg
-543.64
edgeInsets
UIEdgeInsets: {0, 0, 0, 0}
flt
0
integer
0
orderSet
21423.654
fgewgweg
<UIView: 0x7ff8ba713fc0; frame = (0 0; 0 0); layer = <CALayer: 0x7ff8ba714130>>
1
fewfwe
point
NSPoint: {0, 0}
range
NSRange: {0, 0}
rect
NSRect: {{0, 0}, {0, 0}}
set
0
4.325
fgewgweg
<UIView: 0x7ff8ba713d10; frame = (0 0; 0 0); layer = <CALayer: 0x7ff8ba713e80>>
size
NSSize: {0, 0}
๐-[ViewController viewDidAppear:] + 103๐self.view.window =
0๏ผ ; layer = >
1๏ผ >
2๏ผ <_UILayoutGuide: 0x7ff8ba712380; frame = (0 0; 0 20); hidden = YES; layer = >
2๏ผ <_UILayoutGuide: 0x7ff8ba534d40; frame = (0 736; 0 0); hidden = YES; layer = >// Different debug log experience!
```
### License
LxDBAnything is available under the MIT License. See the LICENSE file for more info.