byebug 10.0.0 → 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 +350 -284
- data/CONTRIBUTING.md +6 -34
- data/GUIDE.md +9 -8
- data/LICENSE +18 -18
- data/README.md +83 -70
- data/exe/byebug +1 -1
- data/ext/byebug/breakpoint.c +1 -1
- data/ext/byebug/byebug.c +10 -15
- data/ext/byebug/byebug.h +11 -9
- data/ext/byebug/context.c +21 -8
- data/ext/byebug/locker.c +4 -4
- data/ext/byebug/threads.c +4 -4
- data/lib/byebug.rb +1 -1
- data/lib/byebug/attacher.rb +4 -4
- data/lib/byebug/command.rb +2 -2
- data/lib/byebug/command_list.rb +1 -1
- data/lib/byebug/commands.rb +38 -37
- data/lib/byebug/commands/break.rb +10 -14
- data/lib/byebug/commands/catch.rb +4 -8
- data/lib/byebug/commands/condition.rb +3 -5
- data/lib/byebug/commands/continue.rb +27 -9
- data/lib/byebug/commands/debug.rb +2 -2
- data/lib/byebug/commands/delete.rb +3 -5
- data/lib/byebug/commands/disable.rb +4 -4
- 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 +2 -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/breakpoints.rb +2 -4
- data/lib/byebug/commands/info/display.rb +1 -3
- data/lib/byebug/commands/info/file.rb +2 -4
- data/lib/byebug/commands/interrupt.rb +1 -1
- data/lib/byebug/commands/irb.rb +2 -4
- data/lib/byebug/commands/kill.rb +3 -5
- 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 +3 -5
- data/lib/byebug/commands/quit.rb +4 -4
- 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 +85 -0
- data/lib/byebug/commands/source.rb +2 -4
- 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 +2 -4
- data/lib/byebug/commands/thread/stop.rb +1 -1
- data/lib/byebug/commands/thread/switch.rb +1 -1
- data/lib/byebug/commands/tracevar.rb +2 -5
- data/lib/byebug/commands/undisplay.rb +5 -6
- 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 +2 -4
- 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 +11 -10
- data/lib/byebug/frame.rb +2 -2
- data/lib/byebug/helpers/bin.rb +2 -2
- data/lib/byebug/helpers/eval.rb +7 -7
- data/lib/byebug/helpers/frame.rb +3 -3
- data/lib/byebug/helpers/parse.rb +1 -3
- data/lib/byebug/helpers/string.rb +0 -3
- data/lib/byebug/helpers/toggle.rb +2 -4
- data/lib/byebug/helpers/var.rb +1 -1
- data/lib/byebug/history.rb +5 -5
- data/lib/byebug/interface.rb +6 -6
- data/lib/byebug/interfaces/local_interface.rb +1 -1
- data/lib/byebug/interfaces/remote_interface.rb +1 -1
- data/lib/byebug/interfaces/script_interface.rb +2 -1
- data/lib/byebug/printers/base.rb +4 -5
- data/lib/byebug/printers/plain.rb +2 -2
- 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/remote/client.rb +2 -0
- data/lib/byebug/runner.rb +7 -7
- data/lib/byebug/setting.rb +2 -2
- data/lib/byebug/settings/autoirb.rb +4 -4
- data/lib/byebug/settings/autolist.rb +4 -4
- data/lib/byebug/settings/autopry.rb +4 -4
- data/lib/byebug/settings/autosave.rb +1 -1
- data/lib/byebug/settings/basename.rb +1 -1
- data/lib/byebug/settings/callstyle.rb +2 -2
- 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 +3 -3
- data/lib/byebug/settings/listsize.rb +1 -1
- data/lib/byebug/settings/post_mortem.rb +3 -3
- 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 +9 -9
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
|
|
@@ -43,36 +43,8 @@ abide by its terms.
|
|
43
43
|
|
44
44
|
## Code style
|
45
45
|
|
46
|
-
* Byebug uses
|
47
|
-
|
48
|
-
|
49
|
-
* It also uses some extra style checks that are not available in codeclimate.
|
50
|
-
You can run those using `bin/rake lint`. These tasks are:
|
51
|
-
|
52
|
-
* Linting of c-files using `clang-format`. Configuration is specific to
|
53
|
-
clang-format 3.8, you may need some extra work to get that installed on macOS,
|
54
|
-
see below.
|
55
|
-
|
56
|
-
* Checking correct executable bit on repository files.
|
57
|
-
|
58
|
-
[codeclimate]: https://codeclimate.com/github/deivid-rodriguez/byebug
|
59
|
-
[codeclimate CLI]: https://github.com/codeclimate/codeclimate
|
60
|
-
|
61
|
-
### Runnning `clang-format` on macOS
|
62
|
-
|
63
|
-
At the moment byebug uses older `clang-format` version to enforce C codestyle than
|
64
|
-
can be found in Homebrew. If you are planning to change some C source here it is
|
65
|
-
recommended to use [direnv][] to hook that older version into your shell:
|
66
|
-
|
67
|
-
* Install [direnv][] as described in their README
|
68
|
-
* Install `clang-format@3.8` with `brew install clang-format@3.8`
|
69
|
-
* In byebug source code directory do `echo 'export PATH="/usr/local/opt/clang-format@3.8/bin:$PATH"' > .envrc`
|
70
|
-
* Allow direnv to use that `.envrc` file with `direnv allow`
|
71
|
-
|
72
|
-
With that your `$PATH` will be updated to use older `clang-format` every time you `cd`
|
73
|
-
into byebug source code folder. It will reverted back when you `cd` out of it as well.
|
74
|
-
|
75
|
-
[direnv]: https://github.com/direnv/direnv/
|
46
|
+
* Byebug uses several style checks to check code style consistent. You can run
|
47
|
+
those using `bin/rake lint`.
|
76
48
|
|
77
49
|
## Byebug as a C-extension
|
78
50
|
|
@@ -81,6 +53,6 @@ functionality is implemented in C (the interaction with the TracePoint API).
|
|
81
53
|
The rest of the gem is implemented in Ruby. Normally you won't need to touch
|
82
54
|
the C-extension, but it will obviously depended on the bug you're trying to fix
|
83
55
|
or the feature you are willing to add. You can learn more about C-extensions
|
84
|
-
[here](
|
56
|
+
[here](https://tenderlovemaking.com/2009/12/18/writing-ruby-c-extensions-part-1.html)
|
85
57
|
or
|
86
|
-
[here](
|
58
|
+
[here](https://tenderlovemaking.com/2010/12/11/writing-ruby-c-extensions-part-2.html).
|
data/GUIDE.md
CHANGED
@@ -69,12 +69,12 @@ Now let us step through the program.
|
|
69
69
|
5: tri = 0
|
70
70
|
6:
|
71
71
|
7: 0.upto(n) { |i| tri += i }
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
72
|
+
8:
|
73
|
+
9: tri
|
74
|
+
10: end
|
75
|
+
11:
|
76
|
+
=> 12: t = triangle(3)
|
77
|
+
13: puts t
|
78
78
|
(byebug) <RET> # hit enter
|
79
79
|
|
80
80
|
[1, 10] in /path/to/triangle.rb
|
@@ -613,7 +613,7 @@ We get the same result as if we had run byebug from the outset.
|
|
613
613
|
### Debugging Oddities: How debugging Ruby may be different from other languages
|
614
614
|
|
615
615
|
If you are used to debugging in other languages like C, C++, Perl, Java or even
|
616
|
-
Bash (see [bashdb](http://bashdb.
|
616
|
+
Bash (see [bashdb](http://bashdb.sourceforge.net)), there may be a number of things that
|
617
617
|
seem or feel a little bit different and may confuse you. A number of these
|
618
618
|
things aren't oddities of the debugger per se but differences in how Ruby works
|
619
619
|
compared to those other languages. Because Ruby works a little differently from
|
@@ -1298,7 +1298,7 @@ Running a program from byebug adds a bit of overhead and slows it down a little.
|
|
1298
1298
|
Furthermore, by necessity, debuggers change the operation of the program they
|
1299
1299
|
are debugging. And this can lead to unexpected and unwanted differences. It has
|
1300
1300
|
happened so often that the term
|
1301
|
-
[Heisenbugs](
|
1301
|
+
[Heisenbugs](https://en.wikipedia.org/wiki/Heisenbug) was coined to describe the
|
1302
1302
|
situation where using a debugger (among other possibilities) changes the
|
1303
1303
|
behavior of the program so that the bug doesn't manifest itself anymore.
|
1304
1304
|
|
@@ -1468,6 +1468,7 @@ display a short list of named classes of commands
|
|
1468
1468
|
save -- Saves current byebug session to a file
|
1469
1469
|
set -- Modifies byebug settings
|
1470
1470
|
show -- Shows byebug settings
|
1471
|
+
skip -- Runs until the next breakpoint as long as it is different from the current one
|
1471
1472
|
source -- Restores a previously saved byebug session
|
1472
1473
|
step -- Steps into blocks or methods one or more times
|
1473
1474
|
thread -- Commands to manipulate threads
|
data/LICENSE
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
Copyright (c) David Rodríguez <deivid.rodriguez@
|
1
|
+
Copyright (c) 2018 David Rodríguez <deivid.rodriguez@riseup.net>
|
2
2
|
All rights reserved.
|
3
3
|
|
4
4
|
Redistribution and use in source and binary forms, with or without
|
5
|
-
modification, are permitted provided that the following conditions
|
6
|
-
are met:
|
7
|
-
1. Redistributions of source code must retain the above copyright
|
8
|
-
notice, this list of conditions and the following disclaimer.
|
9
|
-
2. Redistributions in binary form must reproduce the above copyright
|
10
|
-
notice, this list of conditions and the following disclaimer in the
|
11
|
-
documentation and/or other materials provided with the distribution.
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
12
6
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
* Redistributions of source code must retain the above copyright notice, this
|
8
|
+
list of conditions and the following disclaimer.
|
9
|
+
|
10
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
this list of conditions and the following disclaimer in the documentation
|
12
|
+
and/or other materials provided with the distribution.
|
13
|
+
|
14
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
15
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
16
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
17
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
17
18
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
18
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
SUCH DAMAGE.
|
19
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
20
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
21
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
22
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
23
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
CHANGED
@@ -1,27 +1,28 @@
|
|
1
1
|
# Byebug
|
2
2
|
|
3
3
|
[![Version][gem]][gem_url]
|
4
|
-
[![
|
4
|
+
[![Tidelift][tid]][tid_url]
|
5
5
|
[![Coverage][cov]][cov_url]
|
6
6
|
[![Gitter][irc]][irc_url]
|
7
7
|
|
8
8
|
[gem]: https://img.shields.io/gem/v/byebug.svg
|
9
|
-
[
|
9
|
+
[tid]: https://tidelift.com/badges/github/deivid-rodriguez/byebug
|
10
10
|
[cov]: https://api.codeclimate.com/v1/badges/f1a1bec582752c22da80/test_coverage
|
11
11
|
[irc]: https://img.shields.io/badge/IRC%20(gitter)-devs%20%26%20users-brightgreen.svg
|
12
12
|
|
13
13
|
[gem_url]: https://rubygems.org/gems/byebug
|
14
|
-
[
|
14
|
+
[tid_url]: https://tidelift.com/subscription/pkg/rubygems-byebug?utm_source=rubygems-byebug&utm_medium=readme_badge
|
15
15
|
[cov_url]: https://codeclimate.com/github/deivid-rodriguez/byebug/test_coverage
|
16
16
|
[irc_url]: https://gitter.im/deivid-rodriguez/byebug
|
17
17
|
|
18
|
-
Byebug is a simple to use
|
18
|
+
Byebug is a simple to use and feature rich debugger for Ruby. It uses the
|
19
19
|
TracePoint API for execution control and the Debug Inspector API for call stack
|
20
|
-
navigation,
|
21
|
-
|
20
|
+
navigation. Therefore, Byebug doesn't depend on internal core sources. Byebug is also
|
21
|
+
fast because it is developed as a C extension and reliable because it is supported
|
22
|
+
by a full test suite.
|
22
23
|
|
23
|
-
|
24
|
-
and offers many of the traditional debugging features such as:
|
24
|
+
The debugger permits the ability to understand what is going on _inside_ a Ruby program
|
25
|
+
while it executes and offers many of the traditional debugging features such as:
|
25
26
|
|
26
27
|
* Stepping: Running your program one line at a time.
|
27
28
|
* Breaking: Pausing the program at some event or specified instruction, to
|
@@ -31,25 +32,25 @@ and offers many of the traditional debugging features such as:
|
|
31
32
|
* Tracking: Keeping track of the different values of your variables or the
|
32
33
|
different lines executed by your program.
|
33
34
|
|
35
|
+
## For enterprise
|
36
|
+
|
37
|
+
Byebug for enterprise is available via the Tidelift Subscription. [Learn
|
38
|
+
more][Tidelift for enterprise].
|
39
|
+
|
34
40
|
## Build Status
|
35
41
|
|
36
|
-
Linux
|
37
|
-
macOS [![Tra][tra]][tra_url]
|
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
|
-
*
|
51
|
-
|
52
|
-
|
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).
|
53
54
|
|
54
55
|
## Install
|
55
56
|
|
@@ -57,7 +58,7 @@ Windows [![Vey][vey]][vey_url]
|
|
57
58
|
gem install byebug
|
58
59
|
```
|
59
60
|
|
60
|
-
|
61
|
+
Alternatively, if you use `bundler`:
|
61
62
|
|
62
63
|
```shell
|
63
64
|
bundle add byebug --group "development, test"
|
@@ -67,12 +68,9 @@ bundle add byebug --group "development, test"
|
|
67
68
|
|
68
69
|
### From within the Ruby code
|
69
70
|
|
70
|
-
Simply
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
wherever you want to start debugging and the execution will stop there.
|
75
|
-
If you were debugging Rails, for example, you would add `byebug` to your code.
|
71
|
+
Simply include `byebug` wherever you want to start debugging and the execution will
|
72
|
+
stop there. For example, if you were debugging Rails, you would add `byebug` to
|
73
|
+
your code:
|
76
74
|
|
77
75
|
```ruby
|
78
76
|
def index
|
@@ -81,13 +79,13 @@ def index
|
|
81
79
|
end
|
82
80
|
```
|
83
81
|
|
84
|
-
And then start a Rails server
|
82
|
+
And then start a Rails server:
|
85
83
|
|
86
84
|
```shell
|
87
85
|
bin/rails s
|
88
86
|
```
|
89
87
|
|
90
|
-
Once the execution gets to your `byebug` command you will
|
88
|
+
Once the execution gets to your `byebug` command, you will receive a debugging prompt.
|
91
89
|
|
92
90
|
### From the command line
|
93
91
|
|
@@ -99,47 +97,52 @@ byebug myscript.rb
|
|
99
97
|
|
100
98
|
## Byebug's commands
|
101
99
|
|
102
|
-
Command | Aliases
|
103
|
-
------- | -------
|
104
|
-
`backtrace` | `bt` `
|
105
|
-
`break` |
|
106
|
-
`catch` |
|
107
|
-
`condition` |
|
108
|
-
`continue` |
|
109
|
-
`
|
110
|
-
`debug` |
|
111
|
-
`
|
112
|
-
`
|
113
|
-
`
|
114
|
-
`
|
115
|
-
`
|
116
|
-
`
|
117
|
-
`
|
118
|
-
`
|
119
|
-
`
|
120
|
-
`
|
121
|
-
`
|
122
|
-
`
|
123
|
-
`
|
124
|
-
`
|
125
|
-
`
|
126
|
-
`
|
127
|
-
`
|
128
|
-
`
|
129
|
-
`
|
130
|
-
`
|
131
|
-
`
|
132
|
-
`
|
133
|
-
`
|
134
|
-
`
|
135
|
-
`
|
136
|
-
`
|
137
|
-
`
|
138
|
-
`
|
100
|
+
Command | Aliases | Subcommands
|
101
|
+
------- | ------- | -----------
|
102
|
+
`backtrace` | `bt` `w` `where`|
|
103
|
+
`break` | `b` |
|
104
|
+
`catch` | `cat` |
|
105
|
+
`condition` | `cond` |
|
106
|
+
`continue` | `c` `cont` |
|
107
|
+
`continue!` | `c!` `cont!` |
|
108
|
+
`debug` | |
|
109
|
+
`delete` | `del` |
|
110
|
+
`disable` | `dis` | `breakpoints` `display`
|
111
|
+
`display` | `disp` |
|
112
|
+
`down` | |
|
113
|
+
`edit` | `ed` |
|
114
|
+
`enable` | `en` | `breakpoints` `display`
|
115
|
+
`finish` | `fin` |
|
116
|
+
`frame` | `f` |
|
117
|
+
`help` | `h` |
|
118
|
+
`history` | `hist` |
|
119
|
+
`info` | `i` | `args` `breakpoints` `catch` `display` `file` `line` `program`
|
120
|
+
`interrupt` | `int` |
|
121
|
+
`irb` | |
|
122
|
+
`kill` | |
|
123
|
+
`list` | `l` |
|
124
|
+
`method` | `m` | `instance`
|
125
|
+
`next` | `n` |
|
126
|
+
`pry` | |
|
127
|
+
`quit` | `q` |
|
128
|
+
`quit!` | `q!` |
|
129
|
+
`restart` | |
|
130
|
+
`save` | `sa` |
|
131
|
+
`set` | | `autoirb` `autolist` `autopry` `autosave` `basename` `callstyle` `fullpath` `histfile` `histsize` `linetrace` `listsize` `post_mortem` `savefile` `stack_on_error` `width`
|
132
|
+
`show` | | `autoirb` `autolist` `autopry` `autosave` `basename` `callstyle` `fullpath` `histfile` `histsize` `linetrace` `listsize` `post_mortem` `savefile` `stack_on_error` `width`
|
133
|
+
`skip` | `sk` |
|
134
|
+
`source` | `so` |
|
135
|
+
`step` | `s` |
|
136
|
+
`thread` | `th` | `current` `list` `resume` `stop` `switch`
|
137
|
+
`tracevar` | `tr` |
|
138
|
+
`undisplay` | `undisp` |
|
139
|
+
`untracevar`| `untr` |
|
140
|
+
`up` | |
|
141
|
+
`var` | `v` | `all` `constant` `global` `instance` `local`
|
139
142
|
|
140
143
|
## Semantic Versioning
|
141
144
|
|
142
|
-
Byebug
|
145
|
+
Byebug attempts to follow [semantic versioning](https://semver.org) and
|
143
146
|
bump major version only when backwards incompatible changes are released.
|
144
147
|
Backwards compatibility is targeted to [pry-byebug] and any other plugins
|
145
148
|
relying on `byebug`.
|
@@ -164,10 +167,18 @@ started. Proper documentation will be eventually written.
|
|
164
167
|
|
165
168
|
See [Getting Started with Development](CONTRIBUTING.md).
|
166
169
|
|
167
|
-
|
168
|
-
|
170
|
+
## Funding
|
171
|
+
|
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.
|
175
|
+
|
176
|
+
You can also help `byebug` by leaving a small (or big) tip through [Liberapay].
|
177
|
+
|
178
|
+
## Security contact information
|
169
179
|
|
170
|
-
[
|
180
|
+
Please use the Tidelift security contact to [report a security vulnerability].
|
181
|
+
Tidelift will coordinate the fix and disclosure.
|
171
182
|
|
172
183
|
## Credits
|
173
184
|
|
@@ -188,6 +199,8 @@ software, especially:
|
|
188
199
|
[minitest-byebug]: https://github.com/kaspth/minitest-byebug
|
189
200
|
[sublime_debugger]: https://github.com/shuky19/sublime_debugger
|
190
201
|
[atom-byebug]: https://github.com/izaera/atom-byebug
|
191
|
-
[
|
192
|
-
[
|
193
|
-
[
|
202
|
+
[Liberapay]: https://liberapay.com/byebug/donate
|
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
|
206
|
+
[report a security vulnerability]: https://tidelift.com/security
|
data/exe/byebug
CHANGED
data/ext/byebug/breakpoint.c
CHANGED
data/ext/byebug/byebug.c
CHANGED
@@ -244,7 +244,7 @@ call_at_line_check(VALUE ctx, debug_context_t *dc, VALUE breakpoint)
|
|
244
244
|
if (!NIL_P(breakpoint))
|
245
245
|
call_at_breakpoint(ctx, dc, breakpoint);
|
246
246
|
|
247
|
-
|
247
|
+
byebug_reset_stepping_stop_points(dc);
|
248
248
|
|
249
249
|
call_at_line(ctx, dc);
|
250
250
|
}
|
@@ -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);
|
@@ -344,7 +337,7 @@ return_event(VALUE trace_point, void *data)
|
|
344
337
|
|
345
338
|
if ((dc->steps_out == 0) && (CTX_FL_TEST(dc, CTX_FL_STOP_ON_RET)))
|
346
339
|
{
|
347
|
-
|
340
|
+
byebug_reset_stepping_stop_points(dc);
|
348
341
|
|
349
342
|
call_at_return(context, dc, rb_tracearg_return_value(trace_arg));
|
350
343
|
}
|
@@ -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);
|
@@ -393,7 +388,7 @@ end_event(VALUE trace_point, void *data)
|
|
393
388
|
|
394
389
|
if ((dc->steps_out == 0) && (CTX_FL_TEST(dc, CTX_FL_STOP_ON_RET)))
|
395
390
|
{
|
396
|
-
|
391
|
+
byebug_reset_stepping_stop_points(dc);
|
397
392
|
|
398
393
|
call_at_end(context, dc);
|
399
394
|
}
|
@@ -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);
|
@@ -747,7 +742,7 @@ Debug_load(int argc, VALUE *argv, VALUE self)
|
|
747
742
|
if (0 != state)
|
748
743
|
{
|
749
744
|
status = rb_errinfo();
|
750
|
-
|
745
|
+
byebug_reset_stepping_stop_points(dc);
|
751
746
|
}
|
752
747
|
|
753
748
|
return status;
|
@@ -891,8 +886,8 @@ Init_byebug()
|
|
891
886
|
rb_define_module_function(mByebug, "verbose=", Set_verbose, 1);
|
892
887
|
|
893
888
|
Init_threads_table(mByebug);
|
894
|
-
|
895
|
-
|
889
|
+
Init_byebug_context(mByebug);
|
890
|
+
Init_byebug_breakpoint(mByebug);
|
896
891
|
|
897
892
|
rb_global_variable(&breakpoints);
|
898
893
|
rb_global_variable(&catchpoints);
|