backtracer 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +7 -8
- data/VERSION +1 -1
- data/lib/backtracer_tracer_exception_creation.rb +21 -0
- metadata +3 -2
data/README
CHANGED
@@ -5,7 +5,7 @@ If you've ever seen
|
|
5
5
|
...24 levels...
|
6
6
|
and disliked it, this is the gem for you.
|
7
7
|
|
8
|
-
If you've ever wished
|
8
|
+
If you've ever wished the exception trace would display the code of each line (a la Python), then this gem is for you.
|
9
9
|
|
10
10
|
It displays the full back trace (no ...'s), along with the code from each line! It can even display local variables at each level of the call stack, if desired.
|
11
11
|
|
@@ -30,11 +30,11 @@ crash.rb:10
|
|
30
30
|
go '3'
|
31
31
|
|
32
32
|
|
33
|
-
(
|
33
|
+
(Now has the code lines, and if there had been ...'s, would have ovecome them).
|
34
34
|
|
35
|
-
or the --locals option
|
35
|
+
or use the --locals option
|
36
36
|
|
37
|
-
$backtracer --locals crash.rb
|
37
|
+
$ backtracer --locals crash.rb
|
38
38
|
|
39
39
|
unhandled exception: crash.rb:2: raise
|
40
40
|
locals: {"a"=>"3", "b"=>55}
|
@@ -44,17 +44,16 @@ unhandled exception: crash.rb:2: raise
|
|
44
44
|
crash.rb:5 go(a=>3)
|
45
45
|
locals: {"a"=>"3"}
|
46
46
|
|
47
|
-
(displays locals, parameters
|
47
|
+
(displays locals, parameters as current value)
|
48
48
|
|
49
|
-
Also included is
|
49
|
+
Also included are several other options. One is --ping, which periodically dumps current threads' backtrace(s) (quite useful for profiling to see where you code is spending a lot of its time (thanks xray gem!)). There is also an option that will print out thread dumps whenever you hit ctrl+c.
|
50
50
|
|
51
51
|
To see all possible backtrace options run
|
52
52
|
$ backtracer -h
|
53
53
|
or
|
54
54
|
$ backtracer --help
|
55
55
|
|
56
|
-
|
57
|
-
More example outputs:
|
56
|
+
More examples can be found here:
|
58
57
|
|
59
58
|
http://github.com/rdp/backtracer/blob/master/examples/example_test_all_output
|
60
59
|
http://github.com/rdp/backtracer/blob/master/examples/example_test_large_output
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'faster_rubygems'
|
2
|
+
require 'event_hook'
|
3
|
+
|
4
|
+
class Demo < EventHook
|
5
|
+
def self.process(*args)
|
6
|
+
|
7
|
+
# args => [64, #<RuntimeError: hello>, :initialize, Exception]
|
8
|
+
begin
|
9
|
+
if args[1].is_a? Exception
|
10
|
+
puts args.inspect
|
11
|
+
end
|
12
|
+
rescue
|
13
|
+
# fantastically, this check fails within rails at times
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
Demo.start_hook
|
19
|
+
|
20
|
+
# TODO 1.9 compat
|
21
|
+
#set_trace_func proc {|*args| puts args.inspect }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backtracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors: []
|
7
7
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-12 00:00:00 -07:00
|
13
13
|
default_executable: backtracer
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- lib/backtracer_simple.rb
|
50
50
|
- lib/backtracer_tracer.rb
|
51
51
|
- lib/backtracer_tracer_args.rb
|
52
|
+
- lib/backtracer_tracer_exception_creation.rb
|
52
53
|
- lib/core_backtracer.rb
|
53
54
|
- lib/shared.rb
|
54
55
|
- lib/tracerr.rb
|