• Stars
    star
    187
  • Rank 200,312 (Top 5 %)
  • Language
    Objective-C
  • Created about 10 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is a tool for understanding your methods. You can monitor the input / output value, method relationships, method process time.

DaiMethodTracing

This is a tool for understanding your methods. You can monitor the input / output value, method relationships, method process time.

image

DaidoujiChen

[email protected]

特別感謝 Hai Feng Kao 提供 block 部分的做法 MABlockForwarding.

總覽

概念起源於 debug 時候的一些想法, 有時候想看看每個 method 的傳值是不是正確, 回傳值是不是正確, 以及執行花費多少時間等等的, 如果一個 method 一個 method 加的話, 實在是太累了, 所以寫了一個方法可以直接監看某個 class, 讓他下面的 method 怎麼執行, 完整地呈現出來.

大概我們可以分成幾個面向來使用這個工具,

  1. 當接到一份沒有摸過的而有 bug 的 code, 想要迅速的了解 method 之間的流竄, 可以利用 DaiMethodTracing 加速理解.
  2. 觀察系統內的 method 傳遞, 比方, UIWindow, UIWebView, UIScrollView 之類, 可以正確的剖析出正確的切入點.
  3. 觀察 static library 的活動, 任何可知道 class 名稱的內容, 都可以藉由 NSClassFromNSString 切進去.
  4. Hai Feng Kao 的幫助下, block 目前也可以切得進去囉, 如同 method 一般, 我們可以觀察他的傳入傳出值, 以及運行的時間.

簡易使用

還是很簡單, 首先把 DaiMethodTracing 下的所有東西 add 到你的專案中, 然後

#import "DaiMethodTracing.h"

然後, 在任何地方使用, (其中 yourClass 是你想換的那個 class name)

[DaiMethodTracing tracingClass:[yourClass class]];

即可監看該 class 下 method 的活動狀態.

已知問題

無法對付 struct.

  • struct, 內建的應該是可以, 但是自定義的 struct 會有解析上的問題.

More Repositories

1

Dai-Hentai

一個普通的看漫畫 App
Objective-C
1,225
star
2

DaiExpandCollectionView

Expand the current selected item. Focus the user's eyes.
Objective-C
163
star
3

DaiNavigationTransition

Idea from http://nonomori.farbox.com/post/ios-7-jiao-hu-shi-guo-du, and convert this transition effect more easier to use.You can use this effect on ios6 !!
Objective-C
141
star
4

DaiDodgeKeyboard

Let your textfield / textview automatic dodge your keyboard.
Objective-C
85
star
5

DaiMethodHelper

A Tool for scan duplicate methods, verify method implementation, or force invoke the method!
Objective-C
68
star
6

DaiLive2DPlayground

Get a girl friend in programming
C++
65
star
7

DaiInboxHUD

這是一個模仿 google inbox 轉圈效果的 HUD
Objective-C
37
star
8

DaiDebugLog

開發者與工作夥伴的溝通利器!
Objective-C
19
star
9

DaiYoutubeParser

Parse the youtube video url path, do any custom things you want.
Objective-C
12
star
10

DispatchTimer

It is base on Dispatch Timer Source. Make it like NSTimer to use.
Objective-C
5
star
11

RuntimeSample_20150702

RuntimeSample_20150702
Objective-C
5
star
12

waifu2x-iOS

waifu2x re-implementation in C++ using OpenCV for iOS
C++
5
star
13

DaiYoutubeParserSwift

Parse the youtube video url path, do any custom things you want.
Swift
5
star
14

DaiPortalV2

Portal is a idea for transfer objects from A place to B place.
C
3
star
15

DaiSurvivor

Help your apps survive in the background!! 幫助你的 app 在背景中生存!!
Objective-C
3
star
16

DaiVolume

I DON'T want to use MPVolumeView.
Objective-C
3
star
17

RuntimeSample_20150806

RuntimeSample_20150806
C++
3
star
18

DaiFileManagerSwift

An easier way to control files. 簡單容易存取檔案
Swift
3
star
19

MoeMoeChu

Mac 端使用版本
Swift
3
star
20

htags

service e/ex tag 中文對照表, 來源自 https://github.com/Mapaler/EhTagTranslator
Go
3
star
21

DaiStorage

DaiStorage
Objective-C
2
star
22

DaiQuickPicker

DaiQuickPicker
Objective-C
2
star
23

LightWeightPlist

It is a lightweight tool allows you to easily access plist files in document / resource folder
Objective-C
2
star
24

RuntimeSample_20151015

RuntimeSample_20151015
Objective-C
2
star
25

AmiAmiReborn

上不了架的可憐 app, 用來看 amiami 的小人們
Objective-C
2
star
26

ImageFilter

圖片分類
Swift
1
star
27

InstallCloud9OnEC2

Cloud9 on EC2 安裝筆記
1
star
28

DaiBenchmark

How Much Balls Can You Display?
Swift
1
star
29

Dai36Converter

私用 36 進位計算機
Swift
1
star
30

DaiFrame

DaiFrame
Objective-C
1
star
31

Shinsi

Shinsi is a ex-hentai viewer in Swift 2.0
Swift
1
star
32

DmhyRSSEnhance

Add Some Feature on Dmhy RSS
JavaScript
1
star
33

DaiImageReplacer

DaiImageReplacer
Swift
1
star
34

DaiMultipleLevelsPicker

DaiMultipleLevelsPicker
Objective-C
1
star
35

DaiSlam

Play 3D Touch For Fun
Swift
1
star
36

PerfectChatroom

Build a easy chatroom use swift Perfect framework
Swift
1
star
37

RealmPlayground

It is my Realm Playground, just for test Realm.https://github.com/realm/realm-cocoa
Objective-C
1
star