byebug 11.0.1 → 11.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/CONTRIBUTING.md +2 -2
- data/README.md +16 -9
- data/exe/byebug +1 -1
- data/ext/byebug/byebug.c +4 -9
- data/ext/byebug/byebug.h +4 -2
- data/ext/byebug/context.c +15 -2
- data/lib/byebug.rb +1 -1
- data/lib/byebug/attacher.rb +2 -2
- data/lib/byebug/command.rb +2 -2
- data/lib/byebug/command_list.rb +1 -1
- data/lib/byebug/commands.rb +38 -38
- data/lib/byebug/commands/break.rb +5 -5
- data/lib/byebug/commands/catch.rb +2 -2
- data/lib/byebug/commands/condition.rb +2 -2
- data/lib/byebug/commands/continue.rb +2 -2
- data/lib/byebug/commands/debug.rb +2 -2
- data/lib/byebug/commands/delete.rb +2 -2
- data/lib/byebug/commands/disable.rb +3 -3
- data/lib/byebug/commands/disable/breakpoints.rb +1 -1
- data/lib/byebug/commands/disable/display.rb +1 -1
- data/lib/byebug/commands/display.rb +2 -2
- data/lib/byebug/commands/down.rb +3 -3
- data/lib/byebug/commands/edit.rb +1 -1
- data/lib/byebug/commands/enable.rb +3 -3
- data/lib/byebug/commands/enable/breakpoints.rb +1 -1
- data/lib/byebug/commands/enable/display.rb +1 -1
- data/lib/byebug/commands/finish.rb +2 -2
- data/lib/byebug/commands/frame.rb +3 -3
- data/lib/byebug/commands/help.rb +2 -2
- data/lib/byebug/commands/history.rb +2 -2
- data/lib/byebug/commands/info.rb +6 -6
- data/lib/byebug/commands/info/file.rb +1 -1
- data/lib/byebug/commands/interrupt.rb +1 -1
- data/lib/byebug/commands/irb.rb +1 -1
- data/lib/byebug/commands/kill.rb +1 -1
- data/lib/byebug/commands/list.rb +4 -4
- data/lib/byebug/commands/method.rb +2 -2
- data/lib/byebug/commands/next.rb +2 -2
- data/lib/byebug/commands/pry.rb +2 -2
- data/lib/byebug/commands/quit.rb +1 -1
- data/lib/byebug/commands/restart.rb +3 -3
- data/lib/byebug/commands/save.rb +1 -1
- data/lib/byebug/commands/set.rb +3 -3
- data/lib/byebug/commands/show.rb +1 -1
- data/lib/byebug/commands/skip.rb +2 -2
- data/lib/byebug/commands/source.rb +1 -1
- data/lib/byebug/commands/step.rb +2 -2
- data/lib/byebug/commands/thread.rb +6 -6
- data/lib/byebug/commands/thread/current.rb +1 -1
- data/lib/byebug/commands/thread/list.rb +1 -1
- data/lib/byebug/commands/thread/resume.rb +1 -1
- data/lib/byebug/commands/thread/stop.rb +1 -1
- data/lib/byebug/commands/thread/switch.rb +1 -1
- data/lib/byebug/commands/tracevar.rb +1 -1
- data/lib/byebug/commands/undisplay.rb +2 -2
- data/lib/byebug/commands/untracevar.rb +1 -1
- data/lib/byebug/commands/up.rb +3 -3
- data/lib/byebug/commands/var.rb +8 -8
- data/lib/byebug/commands/var/all.rb +1 -1
- data/lib/byebug/commands/var/args.rb +1 -1
- data/lib/byebug/commands/var/const.rb +1 -1
- data/lib/byebug/commands/var/instance.rb +1 -1
- data/lib/byebug/commands/var/local.rb +1 -1
- data/lib/byebug/commands/where.rb +2 -2
- data/lib/byebug/context.rb +4 -4
- data/lib/byebug/core.rb +10 -10
- data/lib/byebug/frame.rb +2 -2
- data/lib/byebug/helpers/parse.rb +1 -1
- data/lib/byebug/helpers/toggle.rb +1 -1
- data/lib/byebug/helpers/var.rb +1 -1
- data/lib/byebug/history.rb +1 -1
- data/lib/byebug/interface.rb +6 -6
- data/lib/byebug/interfaces/remote_interface.rb +1 -1
- data/lib/byebug/interfaces/script_interface.rb +1 -1
- data/lib/byebug/printers/plain.rb +1 -1
- data/lib/byebug/processors/command_processor.rb +2 -2
- data/lib/byebug/processors/control_processor.rb +1 -1
- data/lib/byebug/processors/post_mortem_processor.rb +1 -1
- data/lib/byebug/processors/script_processor.rb +1 -1
- data/lib/byebug/remote.rb +3 -3
- data/lib/byebug/runner.rb +7 -7
- data/lib/byebug/setting.rb +2 -2
- data/lib/byebug/settings/autoirb.rb +2 -2
- data/lib/byebug/settings/autolist.rb +2 -2
- data/lib/byebug/settings/autopry.rb +2 -2
- data/lib/byebug/settings/autosave.rb +1 -1
- data/lib/byebug/settings/basename.rb +1 -1
- data/lib/byebug/settings/callstyle.rb +1 -1
- data/lib/byebug/settings/fullpath.rb +1 -1
- data/lib/byebug/settings/histfile.rb +1 -1
- data/lib/byebug/settings/histsize.rb +1 -1
- data/lib/byebug/settings/linetrace.rb +1 -1
- data/lib/byebug/settings/listsize.rb +1 -1
- data/lib/byebug/settings/post_mortem.rb +1 -1
- data/lib/byebug/settings/savefile.rb +1 -1
- data/lib/byebug/settings/stack_on_error.rb +1 -1
- data/lib/byebug/settings/width.rb +1 -1
- data/lib/byebug/source_file_formatter.rb +2 -2
- data/lib/byebug/subcommands.rb +2 -2
- data/lib/byebug/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 839290652498824c193f448f3f582f8d812025ccd46729de820d449a6a56f2ec
|
4
|
+
data.tar.gz: fc06f3c60b06f90df9ae6f94edd5cff1a7ad8735158dd290206e99b5f7f6f004
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be8f1e2d4c973e1f2af89143d8f6fde26831fc4604ac1c176428d6ff9a1bc70174d93bc3743eae5a0bd8b3033f843eb11fc4e78e94d5ac161819a78eae0edecd
|
7
|
+
data.tar.gz: 65d8b469caf6d089b8a459f8ee473921068b2403eac5b12d920f7a44fb99e0abc1ad6a5cef4066bcdd341941ee00d8f05d0a15aee9a6a44969483bafc2ad64a1
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,20 @@
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## [11.1.0] - 2020-01-20
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
* Official support for MRI 2.7 ([@yui-knk]).
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
|
13
|
+
* [#562](https://github.com/deivid-rodriguez/byebug/pull/562): post mortem mode landing in the wrong line when coming from an exception inside a `Kernel.load` call.
|
14
|
+
|
15
|
+
### Removed
|
16
|
+
|
17
|
+
* Support for MRI 2.3. Byebug no longer installs on this platform.
|
18
|
+
|
5
19
|
## [11.0.1] - 2019-03-18
|
6
20
|
|
7
21
|
### Fixed
|
@@ -789,6 +803,7 @@
|
|
789
803
|
* Initial release.
|
790
804
|
|
791
805
|
[Unreleased]: https://github.com/deivid-rodriguez/byebug/compare/v10.0.2...HEAD
|
806
|
+
[11.1.0]: https://github.com/deivid-rodriguez/byebug/compare/v11.0.1...v11.1.0
|
792
807
|
[11.0.1]: https://github.com/deivid-rodriguez/byebug/compare/v11.0.0...v11.0.1
|
793
808
|
[11.0.0]: https://github.com/deivid-rodriguez/byebug/compare/v10.0.2...v11.0.0
|
794
809
|
[10.0.2]: https://github.com/deivid-rodriguez/byebug/compare/v10.0.1...v10.0.2
|
data/CONTRIBUTING.md
CHANGED
@@ -21,8 +21,8 @@ abide by its terms.
|
|
21
21
|
always have the lastest patch level release installed.
|
22
22
|
* The recommended tool to manage development dependencies is `bundler`. Run
|
23
23
|
`gem install bundler` to install it.
|
24
|
-
* Running `
|
25
|
-
|
24
|
+
* Running `bundle install` inside a local clone of `byebug` will get development
|
25
|
+
dependencies installed.
|
26
26
|
|
27
27
|
## Running the test suite
|
28
28
|
|
data/README.md
CHANGED
@@ -32,22 +32,25 @@ while it executes and offers many of the traditional debugging features such as:
|
|
32
32
|
* Tracking: Keeping track of the different values of your variables or the
|
33
33
|
different lines executed by your program.
|
34
34
|
|
35
|
+
## For enterprise
|
36
|
+
|
37
|
+
Byebug for enterprise is available via the Tidelift Subscription. [Learn
|
38
|
+
more][Tidelift for enterprise].
|
39
|
+
|
35
40
|
## Build Status
|
36
41
|
|
37
|
-
Linux
|
42
|
+
Linux 
|
38
43
|
Windows [![Vey][vey]][vey_url]
|
39
44
|
|
40
|
-
[cir]: https://circleci.com/gh/deivid-rodriguez/byebug/tree/master.svg?style=svg
|
41
|
-
[tra]: https://api.travis-ci.org/deivid-rodriguez/byebug.svg?branch=master
|
42
45
|
[vey]: https://ci.appveyor.com/api/projects/status/github/deivid-rodriguez/byebug?svg=true
|
43
46
|
|
44
|
-
[cir_url]: https://circleci.com/gh/deivid-rodriguez/byebug/tree/master
|
45
|
-
[tra_url]: https://travis-ci.org/deivid-rodriguez/byebug
|
46
47
|
[vey_url]: https://ci.appveyor.com/project/deivid-rodriguez/byebug
|
47
48
|
|
48
49
|
## Requirements
|
49
50
|
|
50
|
-
MRI 2.
|
51
|
+
* _Required_: MRI 2.4.0 or higher.
|
52
|
+
* _Recommended_: MRI 2.6.4 or higher (MRI 2.6.0 to 2.6.3 contain a regression
|
53
|
+
causing unbalanced call/return events in some cases, breaking the `next` command).
|
51
54
|
|
52
55
|
## Install
|
53
56
|
|
@@ -101,6 +104,7 @@ Command | Aliases | Subcommands
|
|
101
104
|
`catch` | `cat` |
|
102
105
|
`condition` | `cond` |
|
103
106
|
`continue` | `c` `cont` |
|
107
|
+
`continue!` | `c!` `cont!` |
|
104
108
|
`debug` | |
|
105
109
|
`delete` | `del` |
|
106
110
|
`disable` | `dis` | `breakpoints` `display`
|
@@ -121,6 +125,7 @@ Command | Aliases | Subcommands
|
|
121
125
|
`next` | `n` |
|
122
126
|
`pry` | |
|
123
127
|
`quit` | `q` |
|
128
|
+
`quit!` | `q!` |
|
124
129
|
`restart` | |
|
125
130
|
`save` | `sa` |
|
126
131
|
`set` | | `autoirb` `autolist` `autopry` `autosave` `basename` `callstyle` `fullpath` `histfile` `histsize` `linetrace` `listsize` `post_mortem` `savefile` `stack_on_error` `width`
|
@@ -164,9 +169,9 @@ See [Getting Started with Development](CONTRIBUTING.md).
|
|
164
169
|
|
165
170
|
## Funding
|
166
171
|
|
167
|
-
Subscribe to [Tidelift] to ensure byebug stays actively
|
168
|
-
same time get licensing assurances and timely security
|
169
|
-
open source dependencies.
|
172
|
+
Subscribe to [Tidelift][Tidelift support] to ensure byebug stays actively
|
173
|
+
maintained, and at the same time get licensing assurances and timely security
|
174
|
+
notifications for your open source dependencies.
|
170
175
|
|
171
176
|
You can also help `byebug` by leaving a small (or big) tip through [Liberapay].
|
172
177
|
|
@@ -196,4 +201,6 @@ software, especially:
|
|
196
201
|
[atom-byebug]: https://github.com/izaera/atom-byebug
|
197
202
|
[Liberapay]: https://liberapay.com/byebug/donate
|
198
203
|
[Tidelift]: https://tidelift.com/subscription/pkg/rubygems-byebug?utm_source=rubygems-byebug&utm_medium=readme_text
|
204
|
+
[Tidelift for enterprise]: https://tidelift.com/subscription/pkg/rubygems-byebug?utm_source=rubygems-byebug&utm_medium=referral&utm_campaign=github&utm_content=enterprise
|
205
|
+
[Tidelift support]: https://tidelift.com/subscription/pkg/rubygems-byebug?utm_source=rubygems-byebug&utm_medium=referral&utm_campaign=github&utm_content=support
|
199
206
|
[report a security vulnerability]: https://tidelift.com/security
|
data/exe/byebug
CHANGED
data/ext/byebug/byebug.c
CHANGED
@@ -305,14 +305,7 @@ call_event(VALUE trace_point, void *data)
|
|
305
305
|
|
306
306
|
CALL_EVENT_SETUP;
|
307
307
|
|
308
|
-
/* nil method_id means we are at top level so there can't be a method
|
309
|
-
* breakpoint here. Just leave then. */
|
310
308
|
msym = rb_tracearg_method_id(trace_arg);
|
311
|
-
if (NIL_P(msym))
|
312
|
-
{
|
313
|
-
EVENT_TEARDOWN;
|
314
|
-
return;
|
315
|
-
}
|
316
309
|
|
317
310
|
mid = SYM2ID(msym);
|
318
311
|
klass = rb_tracearg_defined_class(trace_arg);
|
@@ -367,7 +360,9 @@ return_event(VALUE trace_point, void *data)
|
|
367
360
|
* [#7] b_return@/hort/core_ext/numeric/conversions.rb:133 BigDecimal#to_s
|
368
361
|
* [#7] return@:0 Fixnum#to_s # => This guy...
|
369
362
|
*/
|
370
|
-
if (
|
363
|
+
if (NIL_P(file))
|
364
|
+
rb_warn("The TracePoint API emitted a return event without file information. It might be a bug, please report this.");
|
365
|
+
else
|
371
366
|
{
|
372
367
|
line = rb_tracearg_lineno(trace_arg);
|
373
368
|
binding = rb_tracearg_binding(trace_arg);
|
@@ -436,7 +431,7 @@ raise_event(VALUE trace_point, void *data)
|
|
436
431
|
|
437
432
|
raised_exception = rb_tracearg_raised_exception(trace_arg);
|
438
433
|
|
439
|
-
if (post_mortem == Qtrue)
|
434
|
+
if (post_mortem == Qtrue && !rb_ivar_defined(raised_exception, rb_intern("@__bb_context")))
|
440
435
|
{
|
441
436
|
pm_context = context_dup(dc);
|
442
437
|
rb_ivar_set(raised_exception, rb_intern("@__bb_context"), pm_context);
|
data/ext/byebug/byebug.h
CHANGED
@@ -30,7 +30,8 @@
|
|
30
30
|
} while (0)
|
31
31
|
|
32
32
|
/* types */
|
33
|
-
typedef enum
|
33
|
+
typedef enum
|
34
|
+
{
|
34
35
|
CTX_STOP_NONE,
|
35
36
|
CTX_STOP_STEP,
|
36
37
|
CTX_STOP_BREAKPOINT,
|
@@ -54,7 +55,8 @@ typedef struct
|
|
54
55
|
VALUE backtrace; /* [[loc, self, klass, binding], ...] */
|
55
56
|
} debug_context_t;
|
56
57
|
|
57
|
-
typedef enum
|
58
|
+
typedef enum
|
59
|
+
{
|
58
60
|
LOCATION,
|
59
61
|
SELF,
|
60
62
|
CLASS,
|
data/ext/byebug/context.c
CHANGED
@@ -177,6 +177,13 @@ open_debug_inspector(struct call_with_inspection_data *cwi)
|
|
177
177
|
return rb_debug_inspector_open(open_debug_inspector_i, cwi);
|
178
178
|
}
|
179
179
|
|
180
|
+
static VALUE
|
181
|
+
open_debug_inspector_ensure(VALUE v)
|
182
|
+
{
|
183
|
+
return open_debug_inspector((struct call_with_inspection_data *)v);
|
184
|
+
}
|
185
|
+
|
186
|
+
|
180
187
|
static VALUE
|
181
188
|
close_debug_inspector(struct call_with_inspection_data *cwi)
|
182
189
|
{
|
@@ -184,10 +191,16 @@ close_debug_inspector(struct call_with_inspection_data *cwi)
|
|
184
191
|
return Qnil;
|
185
192
|
}
|
186
193
|
|
194
|
+
static VALUE
|
195
|
+
close_debug_inspector_ensure(VALUE v)
|
196
|
+
{
|
197
|
+
return close_debug_inspector((struct call_with_inspection_data *)v);
|
198
|
+
}
|
199
|
+
|
187
200
|
extern VALUE
|
188
201
|
call_with_debug_inspector(struct call_with_inspection_data *data)
|
189
202
|
{
|
190
|
-
return rb_ensure(
|
203
|
+
return rb_ensure(open_debug_inspector_ensure, (VALUE)data, close_debug_inspector_ensure,
|
191
204
|
(VALUE)data);
|
192
205
|
}
|
193
206
|
|
@@ -669,5 +682,5 @@ Init_byebug_context(VALUE mByebug)
|
|
669
682
|
rb_define_method(cContext, "tracing=", Context_set_tracing, 1);
|
670
683
|
|
671
684
|
cDebugThread = rb_define_class_under(mByebug, "DebugThread", rb_cThread);
|
672
|
-
rb_define_singleton_method(cDebugThread, "inherited", dt_inherited,
|
685
|
+
rb_define_singleton_method(cDebugThread, "inherited", dt_inherited, 0);
|
673
686
|
}
|
data/lib/byebug.rb
CHANGED
data/lib/byebug/attacher.rb
CHANGED
@@ -19,7 +19,7 @@ module Byebug
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.spawn(host = "localhost", port = nil)
|
22
|
-
|
22
|
+
require_relative "core"
|
23
23
|
|
24
24
|
self.wait_connection = true
|
25
25
|
start_server(host, port || PORT)
|
@@ -33,7 +33,7 @@ end
|
|
33
33
|
#
|
34
34
|
module Kernel
|
35
35
|
def byebug
|
36
|
-
|
36
|
+
require_relative "core"
|
37
37
|
|
38
38
|
Byebug.attach unless Byebug.mode == :off
|
39
39
|
end
|
data/lib/byebug/command.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "forwardable"
|
4
|
-
|
4
|
+
require_relative "helpers/string"
|
5
5
|
|
6
6
|
module Byebug
|
7
7
|
#
|
@@ -80,7 +80,7 @@ module Byebug
|
|
80
80
|
def to_s
|
81
81
|
name
|
82
82
|
.split("::")
|
83
|
-
.map { |n| n.gsub(/Command$/, "").downcase if
|
83
|
+
.map { |n| n.gsub(/Command$/, "").downcase if /Command$/.match?(n) }
|
84
84
|
.compact
|
85
85
|
.join(" ")
|
86
86
|
end
|
data/lib/byebug/command_list.rb
CHANGED
data/lib/byebug/commands.rb
CHANGED
@@ -1,40 +1,40 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
3
|
+
require_relative "commands/break"
|
4
|
+
require_relative "commands/catch"
|
5
|
+
require_relative "commands/condition"
|
6
|
+
require_relative "commands/continue"
|
7
|
+
require_relative "commands/debug"
|
8
|
+
require_relative "commands/delete"
|
9
|
+
require_relative "commands/disable"
|
10
|
+
require_relative "commands/display"
|
11
|
+
require_relative "commands/down"
|
12
|
+
require_relative "commands/edit"
|
13
|
+
require_relative "commands/enable"
|
14
|
+
require_relative "commands/finish"
|
15
|
+
require_relative "commands/frame"
|
16
|
+
require_relative "commands/help"
|
17
|
+
require_relative "commands/history"
|
18
|
+
require_relative "commands/info"
|
19
|
+
require_relative "commands/interrupt"
|
20
|
+
require_relative "commands/irb"
|
21
|
+
require_relative "commands/kill"
|
22
|
+
require_relative "commands/list"
|
23
|
+
require_relative "commands/method"
|
24
|
+
require_relative "commands/next"
|
25
|
+
require_relative "commands/pry"
|
26
|
+
require_relative "commands/quit"
|
27
|
+
require_relative "commands/restart"
|
28
|
+
require_relative "commands/save"
|
29
|
+
require_relative "commands/set"
|
30
|
+
require_relative "commands/show"
|
31
|
+
require_relative "commands/skip"
|
32
|
+
require_relative "commands/source"
|
33
|
+
require_relative "commands/step"
|
34
|
+
require_relative "commands/thread"
|
35
|
+
require_relative "commands/tracevar"
|
36
|
+
require_relative "commands/undisplay"
|
37
|
+
require_relative "commands/untracevar"
|
38
|
+
require_relative "commands/up"
|
39
|
+
require_relative "commands/var"
|
40
|
+
require_relative "commands/where"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
require_relative "../command"
|
4
|
+
require_relative "../helpers/eval"
|
5
|
+
require_relative "../helpers/file"
|
6
|
+
require_relative "../helpers/parse"
|
7
|
+
require_relative "../source_file_formatter"
|
8
8
|
|
9
9
|
module Byebug
|
10
10
|
#
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require_relative "../subcommands"
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
require_relative "../commands/disable/breakpoints"
|
6
|
+
require_relative "../commands/disable/display"
|
7
7
|
|
8
8
|
module Byebug
|
9
9
|
#
|