@@ -21,15 +21,15 @@ Introduction
21
21
22
22
` min-debug ` is inspired by [ tj@debug] ( https://github.com/visionmedia/debug )
23
23
24
- Support IE6+
24
+ Support ** IE6+**
25
25
26
- ![ IE6] ( https://cloud.githubusercontent.com/assets/4565306/5972401/d32f21c8-a893 -11e4-813b-852973ae82e0 .png )
26
+ ![ IE6] ( https://cloud.githubusercontent.com/assets/4565306/5986698/2ccc14d8-a93f -11e4-9126-2be906af0951 .png )
27
27
28
28
Easy for ** Phone** debug log
29
29
30
- ![ iPhone] ( https://cloud.githubusercontent.com/assets/4565306/5972402/de802978-a893 -11e4-8f92-5902d99ae697 .png )
30
+ ![ iPhone] ( https://cloud.githubusercontent.com/assets/4565306/5986713/60262480-a940 -11e4-963f-b8f911ec6011 .png )
31
31
32
- Also With log in Console
32
+ Also work with log in ** Console**
33
33
34
34
![ Console] ( https://cloud.githubusercontent.com/assets/4565306/5972375/6ad4bc50-a893-11e4-812e-948bbae5f96d.png )
35
35
@@ -38,14 +38,17 @@ Start
38
38
39
39
Debug with localStorage
40
40
41
- Type ` localStorage[mykey] = '*' ` , and debug just like tj's debug
41
+ Type ` localStorage.debug = '*' ` , then the debug logs just show like tj's debug
42
+
43
+ > if your website is maintained by different teams, you can customize your key rather than 'debug' when initing min-debug module
44
+ > so teams won't disturb each other
42
45
43
46
44
47
Debug with page
45
48
46
- If browser not support localStorage or you want to see debug on page, use url debug
49
+ If browser not support localStorage or you want to see debug log on page, use url debug
47
50
48
- Type ` mykey ='*'` in url href either ` location.search ` or ` location.hash ` , and will see debug info in a textarea on page
51
+ Type ` debug ='*'` in url href either ` location.search ` or ` location.hash ` , and will see debug info in a textarea on page
49
52
50
53
> the key pattern is regexp match, just like tj's debug
51
54
> e.g. ` localStorage.debug = 'api*, call, -*verbose*' `
@@ -61,14 +64,16 @@ run `min-debug` directly with [dist/debug.js](http://chunpu.github.io/min-debug/
61
64
- module.exports
62
65
63
66
64
- If your program using browserify, you should init the debug key self
67
+ If your website using browserify, you should init the debug mnodule self
68
+
69
+ ` debug.js `
65
70
66
71
``` js
67
72
module .exports = exports = require (' min-debug' )
68
73
exports .init (' mykey' ) // default is debug
69
74
```
70
75
71
- ` min-debug ` does not support * print format* , because we may need log on some old browser like IE6
76
+ ` min-debug ` does not support * print format* , because we may need to show logs on some old browsers like IE6
72
77
73
78
``` js
74
79
debug (' my data' , {foo: ' bar' }) // min-debug style
0 commit comments