byebug 2.3.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +3 -11
  4. data/Rakefile +10 -3
  5. data/bin/byebug +16 -2
  6. data/byebug.gemspec +1 -0
  7. data/ext/byebug/byebug.c +0 -54
  8. data/ext/byebug/byebug.h +3 -4
  9. data/ext/byebug/extconf.rb +1 -1
  10. data/lib/byebug.rb +15 -42
  11. data/lib/byebug/command.rb +12 -28
  12. data/lib/byebug/commands/breakpoints.rb +2 -0
  13. data/lib/byebug/commands/catchpoint.rb +1 -1
  14. data/lib/byebug/commands/condition.rb +1 -0
  15. data/lib/byebug/commands/display.rb +6 -0
  16. data/lib/byebug/commands/frame.rb +10 -3
  17. data/lib/byebug/commands/info.rb +5 -3
  18. data/lib/byebug/commands/reload.rb +1 -0
  19. data/lib/byebug/commands/set.rb +5 -1
  20. data/lib/byebug/commands/threads.rb +5 -4
  21. data/lib/byebug/commands/trace.rb +5 -5
  22. data/lib/byebug/context.rb +3 -3
  23. data/lib/byebug/interface.rb +3 -187
  24. data/lib/byebug/interfaces/local_interface.rb +88 -0
  25. data/lib/byebug/interfaces/remote_interface.rb +55 -0
  26. data/lib/byebug/interfaces/script_interface.rb +45 -0
  27. data/lib/byebug/processor.rb +15 -13
  28. data/lib/byebug/version.rb +1 -1
  29. data/test/breakpoints_test.rb +23 -25
  30. data/test/conditions_test.rb +6 -8
  31. data/test/continue_test.rb +4 -6
  32. data/test/debugger_alias_test.rb +5 -0
  33. data/test/display_test.rb +9 -11
  34. data/test/edit_test.rb +0 -2
  35. data/test/eval_test.rb +1 -3
  36. data/test/finish_test.rb +12 -12
  37. data/test/frame_test.rb +38 -40
  38. data/test/help_test.rb +1 -3
  39. data/test/info_test.rb +12 -14
  40. data/test/kill_test.rb +0 -2
  41. data/test/list_test.rb +1 -3
  42. data/test/method_test.rb +0 -2
  43. data/test/post_mortem_test.rb +77 -96
  44. data/test/quit_test.rb +0 -2
  45. data/test/reload_test.rb +0 -2
  46. data/test/repl_test.rb +3 -5
  47. data/test/restart_test.rb +0 -2
  48. data/test/save_test.rb +1 -3
  49. data/test/set_test.rb +3 -5
  50. data/test/show_test.rb +0 -2
  51. data/test/source_test.rb +0 -2
  52. data/test/stepping_test.rb +17 -19
  53. data/test/support/test_dsl.rb +21 -13
  54. data/test/test_helper.rb +23 -1
  55. data/test/thread_test.rb +19 -21
  56. data/test/trace_test.rb +12 -14
  57. data/test/variables_test.rb +6 -6
  58. metadata +22 -3
@@ -1,5 +1,3 @@
1
- require_relative 'test_helper'
2
-
3
1
  class TestTrace < TestDsl::TestCase
4
2
  before do
5
3
  untrace_var(:$bla) if defined?($bla)
@@ -68,37 +66,37 @@ class TestTrace < TestDsl::TestCase
68
66
 
69
67
  describe 'tracing global variables' do
70
68
  it 'must track global variable' do
71
- enter 'trace variable $bla'
69
+ enter 'trace variable bla'
72
70
  debug_file 'trace'
73
- check_output_includes 'traced variable $bla has value 3',
74
- 'traced variable $bla has value 7'
71
+ check_output_includes "traced global variable 'bla' has value '3'",
72
+ "traced global variable 'bla' has value '7'"
75
73
  end
76
74
 
77
75
  it 'must be able to use a shortcut' do
78
- enter 'trace var $bla'
76
+ enter 'trace var bla'
79
77
  debug_file 'trace'
80
- check_output_includes 'traced variable $bla has value 3'
78
+ check_output_includes "traced global variable 'bla' has value '3'"
81
79
  end
82
80
 
83
81
  it 'must track global variable with stop' do
84
- enter 'trace variable $bla stop', 'break 7', 'cont'
85
- debug_file('trace') { $state.line.must_equal 4 }
82
+ enter 'trace variable bla stop', 'break 7', 'cont'
83
+ debug_file('trace') { state.line.must_equal 4 }
86
84
  end
87
85
 
88
86
  it 'must track global variable with nostop' do
89
- enter 'trace variable $bla nostop', 'break 7', 'cont'
90
- debug_file('trace') { $state.line.must_equal 7 }
87
+ enter 'trace variable bla nostop', 'break 7', 'cont'
88
+ debug_file('trace') { state.line.must_equal 7 }
91
89
  end
92
90
 
93
91
  describe 'errors' do
94
92
  it 'must show an error message if there is no such global variable' do
95
- enter 'trace variable $foo'
93
+ enter 'trace variable foo'
96
94
  debug_file 'trace'
97
- check_error_includes '$foo is not a global variable.'
95
+ check_error_includes "'foo' is not a global variable."
98
96
  end
99
97
 
100
98
  it 'must show an error message if subcommand is invalid' do
101
- enter 'trace variable $bla foo'
99
+ enter 'trace variable bla foo'
102
100
  debug_file 'trace'
103
101
  check_error_includes 'expecting "stop" or "nostop"; got "foo"'
104
102
  end
@@ -1,5 +1,3 @@
1
- require_relative 'test_helper'
2
-
3
1
  class VariablesExample
4
2
  SOMECONST = 'foo' unless defined?(SOMECONST)
5
3
 
@@ -22,14 +20,16 @@ end
22
20
 
23
21
  class TestVariables < TestDsl::TestCase
24
22
  describe 'class variables' do
23
+ before { enter "break #{__FILE__}:17", 'cont' }
24
+
25
25
  it 'must show variables' do
26
- enter "break #{__FILE__}:19", 'cont', 'var class'
26
+ enter 'var class'
27
27
  debug_file 'variables'
28
28
  check_output_includes '@@class_c = 3'
29
29
  end
30
30
 
31
31
  it 'must be able to use shortcut' do
32
- enter "break #{__FILE__}:19", 'cont', 'v cl'
32
+ enter 'v cl'
33
33
  debug_file 'variables'
34
34
  check_output_includes '@@class_c = 3'
35
35
  end
@@ -77,7 +77,7 @@ class TestVariables < TestDsl::TestCase
77
77
  end
78
78
 
79
79
  it 'must show instance variables of self' do
80
- enter "break #{__FILE__}:11", 'cont', 'var instance'
80
+ enter "break #{__FILE__}:9", 'cont', 'var instance'
81
81
  debug_file 'variables'
82
82
  check_output_includes '@inst_a = 1', '@inst_b = 2'
83
83
  end
@@ -113,7 +113,7 @@ class TestVariables < TestDsl::TestCase
113
113
 
114
114
  describe 'local variables' do
115
115
  it 'must show local variables' do
116
- enter "break #{__FILE__}:17", 'cont', 'var local'
116
+ enter "break #{__FILE__}:15", 'cont', 'var local'
117
117
  debug_file 'variables'
118
118
  check_output_includes 'a => 4', 'b => nil', 'i => 1'
119
119
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: byebug
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodriguez
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-17 00:00:00.000000000 Z
13
+ date: 2013-12-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: columnize
@@ -82,6 +82,20 @@ dependencies:
82
82
  - - ~>
83
83
  - !ruby/object:Gem::Version
84
84
  version: 0.14.0
85
+ - !ruby/object:Gem::Dependency
86
+ name: minitest
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ~>
90
+ - !ruby/object:Gem::Version
91
+ version: 5.0.8
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ~>
97
+ - !ruby/object:Gem::Version
98
+ version: 5.0.8
85
99
  description: |-
86
100
  Byebug is a Ruby 2 debugger. It's implemented using the
87
101
  Ruby 2 TracePoint C API for execution control and the Debug Inspector C API
@@ -148,6 +162,9 @@ files:
148
162
  - lib/byebug/context.rb
149
163
  - lib/byebug/helper.rb
150
164
  - lib/byebug/interface.rb
165
+ - lib/byebug/interfaces/local_interface.rb
166
+ - lib/byebug/interfaces/remote_interface.rb
167
+ - lib/byebug/interfaces/script_interface.rb
151
168
  - lib/byebug/processor.rb
152
169
  - lib/byebug/remote.rb
153
170
  - lib/byebug/version.rb
@@ -155,6 +172,7 @@ files:
155
172
  - test/breakpoints_test.rb
156
173
  - test/conditions_test.rb
157
174
  - test/continue_test.rb
175
+ - test/debugger_alias_test.rb
158
176
  - test/display_test.rb
159
177
  - test/edit_test.rb
160
178
  - test/eval_test.rb
@@ -240,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
258
  version: '0'
241
259
  requirements: []
242
260
  rubyforge_project:
243
- rubygems_version: 2.1.9
261
+ rubygems_version: 2.1.11
244
262
  signing_key:
245
263
  specification_version: 4
246
264
  summary: Ruby 2.0 fast debugger - base + cli
@@ -248,6 +266,7 @@ test_files:
248
266
  - test/breakpoints_test.rb
249
267
  - test/conditions_test.rb
250
268
  - test/continue_test.rb
269
+ - test/debugger_alias_test.rb
251
270
  - test/display_test.rb
252
271
  - test/edit_test.rb
253
272
  - test/eval_test.rb