runger_byebug 11.2.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 +7 -0
- data/CHANGELOG.md +954 -0
- data/CONTRIBUTING.md +58 -0
- data/GUIDE.md +1806 -0
- data/LICENSE +23 -0
- data/README.md +199 -0
- data/exe/byebug +6 -0
- data/ext/byebug/breakpoint.c +521 -0
- data/ext/byebug/byebug.c +900 -0
- data/ext/byebug/byebug.h +145 -0
- data/ext/byebug/context.c +687 -0
- data/ext/byebug/extconf.rb +12 -0
- data/ext/byebug/locker.c +96 -0
- data/ext/byebug/threads.c +241 -0
- data/lib/byebug/attacher.rb +48 -0
- data/lib/byebug/breakpoint.rb +94 -0
- data/lib/byebug/command.rb +111 -0
- data/lib/byebug/command_list.rb +34 -0
- data/lib/byebug/commands/break.rb +114 -0
- data/lib/byebug/commands/catch.rb +78 -0
- data/lib/byebug/commands/condition.rb +55 -0
- data/lib/byebug/commands/continue.rb +68 -0
- data/lib/byebug/commands/debug.rb +38 -0
- data/lib/byebug/commands/delete.rb +55 -0
- data/lib/byebug/commands/disable/breakpoints.rb +42 -0
- data/lib/byebug/commands/disable/display.rb +43 -0
- data/lib/byebug/commands/disable.rb +33 -0
- data/lib/byebug/commands/display.rb +66 -0
- data/lib/byebug/commands/down.rb +45 -0
- data/lib/byebug/commands/edit.rb +69 -0
- data/lib/byebug/commands/enable/breakpoints.rb +42 -0
- data/lib/byebug/commands/enable/display.rb +43 -0
- data/lib/byebug/commands/enable.rb +33 -0
- data/lib/byebug/commands/finish.rb +57 -0
- data/lib/byebug/commands/frame.rb +57 -0
- data/lib/byebug/commands/help.rb +64 -0
- data/lib/byebug/commands/history.rb +39 -0
- data/lib/byebug/commands/info/breakpoints.rb +65 -0
- data/lib/byebug/commands/info/display.rb +49 -0
- data/lib/byebug/commands/info/file.rb +80 -0
- data/lib/byebug/commands/info/line.rb +35 -0
- data/lib/byebug/commands/info/program.rb +49 -0
- data/lib/byebug/commands/info.rb +37 -0
- data/lib/byebug/commands/interrupt.rb +34 -0
- data/lib/byebug/commands/irb.rb +50 -0
- data/lib/byebug/commands/kill.rb +45 -0
- data/lib/byebug/commands/list.rb +159 -0
- data/lib/byebug/commands/method.rb +53 -0
- data/lib/byebug/commands/next.rb +40 -0
- data/lib/byebug/commands/pry.rb +41 -0
- data/lib/byebug/commands/quit.rb +42 -0
- data/lib/byebug/commands/restart.rb +64 -0
- data/lib/byebug/commands/save.rb +72 -0
- data/lib/byebug/commands/set.rb +79 -0
- data/lib/byebug/commands/show.rb +45 -0
- data/lib/byebug/commands/skip.rb +85 -0
- data/lib/byebug/commands/source.rb +40 -0
- data/lib/byebug/commands/step.rb +40 -0
- data/lib/byebug/commands/thread/current.rb +37 -0
- data/lib/byebug/commands/thread/list.rb +43 -0
- data/lib/byebug/commands/thread/resume.rb +45 -0
- data/lib/byebug/commands/thread/stop.rb +43 -0
- data/lib/byebug/commands/thread/switch.rb +46 -0
- data/lib/byebug/commands/thread.rb +34 -0
- data/lib/byebug/commands/tracevar.rb +54 -0
- data/lib/byebug/commands/undisplay.rb +51 -0
- data/lib/byebug/commands/untracevar.rb +36 -0
- data/lib/byebug/commands/up.rb +45 -0
- data/lib/byebug/commands/var/all.rb +41 -0
- data/lib/byebug/commands/var/args.rb +39 -0
- data/lib/byebug/commands/var/const.rb +49 -0
- data/lib/byebug/commands/var/global.rb +37 -0
- data/lib/byebug/commands/var/instance.rb +39 -0
- data/lib/byebug/commands/var/local.rb +39 -0
- data/lib/byebug/commands/var.rb +37 -0
- data/lib/byebug/commands/where.rb +64 -0
- data/lib/byebug/commands.rb +40 -0
- data/lib/byebug/context.rb +157 -0
- data/lib/byebug/core.rb +115 -0
- data/lib/byebug/errors.rb +29 -0
- data/lib/byebug/frame.rb +185 -0
- data/lib/byebug/helpers/bin.rb +47 -0
- data/lib/byebug/helpers/eval.rb +134 -0
- data/lib/byebug/helpers/file.rb +63 -0
- data/lib/byebug/helpers/frame.rb +75 -0
- data/lib/byebug/helpers/parse.rb +80 -0
- data/lib/byebug/helpers/path.rb +40 -0
- data/lib/byebug/helpers/reflection.rb +19 -0
- data/lib/byebug/helpers/string.rb +33 -0
- data/lib/byebug/helpers/thread.rb +67 -0
- data/lib/byebug/helpers/toggle.rb +62 -0
- data/lib/byebug/helpers/var.rb +70 -0
- data/lib/byebug/history.rb +130 -0
- data/lib/byebug/interface.rb +146 -0
- data/lib/byebug/interfaces/local_interface.rb +63 -0
- data/lib/byebug/interfaces/remote_interface.rb +50 -0
- data/lib/byebug/interfaces/script_interface.rb +33 -0
- data/lib/byebug/interfaces/test_interface.rb +67 -0
- data/lib/byebug/option_setter.rb +95 -0
- data/lib/byebug/printers/base.rb +68 -0
- data/lib/byebug/printers/plain.rb +44 -0
- data/lib/byebug/printers/texts/base.yml +115 -0
- data/lib/byebug/printers/texts/plain.yml +33 -0
- data/lib/byebug/processors/command_processor.rb +173 -0
- data/lib/byebug/processors/control_processor.rb +24 -0
- data/lib/byebug/processors/post_mortem_processor.rb +18 -0
- data/lib/byebug/processors/script_processor.rb +49 -0
- data/lib/byebug/remote/client.rb +57 -0
- data/lib/byebug/remote/server.rb +47 -0
- data/lib/byebug/remote.rb +85 -0
- data/lib/byebug/runner.rb +198 -0
- data/lib/byebug/setting.rb +79 -0
- data/lib/byebug/settings/autoirb.rb +29 -0
- data/lib/byebug/settings/autolist.rb +29 -0
- data/lib/byebug/settings/autopry.rb +29 -0
- data/lib/byebug/settings/autosave.rb +17 -0
- data/lib/byebug/settings/basename.rb +16 -0
- data/lib/byebug/settings/callstyle.rb +20 -0
- data/lib/byebug/settings/fullpath.rb +16 -0
- data/lib/byebug/settings/histfile.rb +20 -0
- data/lib/byebug/settings/histsize.rb +20 -0
- data/lib/byebug/settings/linetrace.rb +22 -0
- data/lib/byebug/settings/listsize.rb +21 -0
- data/lib/byebug/settings/post_mortem.rb +27 -0
- data/lib/byebug/settings/savefile.rb +20 -0
- data/lib/byebug/settings/stack_on_error.rb +15 -0
- data/lib/byebug/settings/width.rb +20 -0
- data/lib/byebug/source_file_formatter.rb +71 -0
- data/lib/byebug/subcommands.rb +54 -0
- data/lib/byebug/version.rb +8 -0
- data/lib/byebug.rb +3 -0
- metadata +194 -0
data/LICENSE
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Copyright (c) 2018 David Rodríguez <deivid.rodriguez@riseup.net>
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
|
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
|
18
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
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
ADDED
@@ -0,0 +1,199 @@
|
|
1
|
+
# Byebug
|
2
|
+
|
3
|
+
[![Version][gem]][gem_url]
|
4
|
+
[![Tidelift][tid]][tid_url]
|
5
|
+
[![Gitter][irc]][irc_url]
|
6
|
+
|
7
|
+
[gem]: https://img.shields.io/gem/v/byebug.svg
|
8
|
+
[tid]: https://tidelift.com/badges/package/rubygems/byebug
|
9
|
+
[irc]: https://img.shields.io/badge/IRC%20(gitter)-devs%20%26%20users-brightgreen.svg
|
10
|
+
|
11
|
+
[gem_url]: https://rubygems.org/gems/byebug
|
12
|
+
[tid_url]: https://tidelift.com/subscription/pkg/rubygems-byebug?utm_source=rubygems-byebug&utm_medium=readme_badge
|
13
|
+
[irc_url]: https://gitter.im/deivid-rodriguez/byebug
|
14
|
+
|
15
|
+
Byebug is a simple to use and feature rich debugger for Ruby. It uses the
|
16
|
+
TracePoint API for execution control and the Debug Inspector API for call stack
|
17
|
+
navigation. Therefore, Byebug doesn't depend on internal core sources. Byebug is also
|
18
|
+
fast because it is developed as a C extension and reliable because it is supported
|
19
|
+
by a full test suite.
|
20
|
+
|
21
|
+
The debugger permits the ability to understand what is going on _inside_ a Ruby program
|
22
|
+
while it executes and offers many of the traditional debugging features such as:
|
23
|
+
|
24
|
+
* Stepping: Running your program one line at a time.
|
25
|
+
* Breaking: Pausing the program at some event or specified instruction, to
|
26
|
+
examine the current state.
|
27
|
+
* Evaluating: Basic REPL functionality, although [pry] does a better job at
|
28
|
+
that.
|
29
|
+
* Tracking: Keeping track of the different values of your variables or the
|
30
|
+
different lines executed by your program.
|
31
|
+
|
32
|
+
## For enterprise
|
33
|
+
|
34
|
+
Byebug for enterprise is available via the Tidelift Subscription. [Learn
|
35
|
+
more][Tidelift for enterprise].
|
36
|
+
|
37
|
+
## Build Status
|
38
|
+
|
39
|
+

|
40
|
+

|
41
|
+
|
42
|
+
## Requirements
|
43
|
+
|
44
|
+
* _Required_: MRI 2.5.0 or higher.
|
45
|
+
* _Recommended_: MRI 2.6.4 or higher (MRI 2.6.0 to 2.6.3 contain a regression
|
46
|
+
causing unbalanced call/return events in some cases, breaking the `next` command).
|
47
|
+
|
48
|
+
## Install
|
49
|
+
|
50
|
+
```shell
|
51
|
+
gem install byebug
|
52
|
+
```
|
53
|
+
|
54
|
+
Alternatively, if you use `bundler`:
|
55
|
+
|
56
|
+
```shell
|
57
|
+
bundle add byebug --group "development, test"
|
58
|
+
```
|
59
|
+
|
60
|
+
## Usage
|
61
|
+
|
62
|
+
### From within the Ruby code
|
63
|
+
|
64
|
+
Simply include `byebug` wherever you want to start debugging and the execution will
|
65
|
+
stop there. For example, if you were debugging Rails, you would add `byebug` to
|
66
|
+
your code:
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
def index
|
70
|
+
byebug
|
71
|
+
@articles = Article.find_recent
|
72
|
+
end
|
73
|
+
```
|
74
|
+
|
75
|
+
And then start a Rails server:
|
76
|
+
|
77
|
+
```shell
|
78
|
+
bin/rails s
|
79
|
+
```
|
80
|
+
|
81
|
+
Once the execution gets to your `byebug` command, you will receive a debugging prompt.
|
82
|
+
|
83
|
+
### From the command line
|
84
|
+
|
85
|
+
If you want to debug a Ruby script without editing it, you can invoke byebug from the command line.
|
86
|
+
|
87
|
+
```shell
|
88
|
+
byebug myscript.rb
|
89
|
+
```
|
90
|
+
|
91
|
+
## Byebug's commands
|
92
|
+
|
93
|
+
Command | Aliases | Subcommands
|
94
|
+
------- | ------- | -----------
|
95
|
+
`backtrace` | `bt` `w` `where`|
|
96
|
+
`break` | `b` |
|
97
|
+
`catch` | `cat` |
|
98
|
+
`condition` | `cond` |
|
99
|
+
`continue` | `c` `cont` |
|
100
|
+
`continue!` | `c!` `cont!` |
|
101
|
+
`debug` | |
|
102
|
+
`delete` | `del` |
|
103
|
+
`disable` | `dis` | `breakpoints` `display`
|
104
|
+
`display` | `disp` |
|
105
|
+
`down` | |
|
106
|
+
`edit` | `ed` |
|
107
|
+
`enable` | `en` | `breakpoints` `display`
|
108
|
+
`finish` | `fin` |
|
109
|
+
`frame` | `f` |
|
110
|
+
`help` | `h` |
|
111
|
+
`history` | `hist` |
|
112
|
+
`info` | `i` | `args` `breakpoints` `catch` `display` `file` `line` `program`
|
113
|
+
`interrupt` | `int` |
|
114
|
+
`irb` | |
|
115
|
+
`kill` | |
|
116
|
+
`list` | `l` |
|
117
|
+
`method` | `m` | `instance`
|
118
|
+
`next` | `n` |
|
119
|
+
`pry` | |
|
120
|
+
`quit` | `q` |
|
121
|
+
`quit!` | `q!` |
|
122
|
+
`restart` | |
|
123
|
+
`save` | `sa` |
|
124
|
+
`set` | | `autoirb` `autolist` `autopry` `autosave` `basename` `callstyle` `fullpath` `histfile` `histsize` `linetrace` `listsize` `post_mortem` `savefile` `stack_on_error` `width`
|
125
|
+
`show` | | `autoirb` `autolist` `autopry` `autosave` `basename` `callstyle` `fullpath` `histfile` `histsize` `linetrace` `listsize` `post_mortem` `savefile` `stack_on_error` `width`
|
126
|
+
`skip` | `sk` |
|
127
|
+
`source` | `so` |
|
128
|
+
`step` | `s` |
|
129
|
+
`thread` | `th` | `current` `list` `resume` `stop` `switch`
|
130
|
+
`tracevar` | `tr` |
|
131
|
+
`undisplay` | `undisp` |
|
132
|
+
`untracevar`| `untr` |
|
133
|
+
`up` | |
|
134
|
+
`var` | `v` | `all` `constant` `global` `instance` `local`
|
135
|
+
|
136
|
+
## Semantic Versioning
|
137
|
+
|
138
|
+
Byebug attempts to follow [semantic versioning](https://semver.org) and
|
139
|
+
bump major version only when backwards incompatible changes are released.
|
140
|
+
Backwards compatibility is targeted to [pry-byebug] and any other plugins
|
141
|
+
relying on `byebug`.
|
142
|
+
|
143
|
+
## Getting Started
|
144
|
+
|
145
|
+
Read [byebug's markdown
|
146
|
+
guide](https://github.com/deivid-rodriguez/byebug/blob/master/GUIDE.md) to get
|
147
|
+
started. Proper documentation will be eventually written.
|
148
|
+
|
149
|
+
## Related projects
|
150
|
+
|
151
|
+
* [pry-byebug] adds `next`, `step`, `finish`, `continue` and `break` commands
|
152
|
+
to `pry` using `byebug`.
|
153
|
+
* [ruby-debug-passenger] adds a rake task that restarts Passenger with Byebug
|
154
|
+
connected.
|
155
|
+
* [minitest-byebug] starts a byebug session on minitest failures.
|
156
|
+
* [sublime_debugger] provides a plugin for ruby debugging on Sublime Text.
|
157
|
+
* [atom-byebug] provides integration with the Atom editor [EXPERIMENTAL].
|
158
|
+
|
159
|
+
## Contribute
|
160
|
+
|
161
|
+
See [Getting Started with Development](CONTRIBUTING.md).
|
162
|
+
|
163
|
+
## Funding
|
164
|
+
|
165
|
+
Subscribe to [Tidelift][Tidelift support] to ensure byebug stays actively
|
166
|
+
maintained, and at the same time get licensing assurances and timely security
|
167
|
+
notifications for your open source dependencies.
|
168
|
+
|
169
|
+
You can also help `byebug` by leaving a small (or big) tip through [Liberapay].
|
170
|
+
|
171
|
+
## Security contact information
|
172
|
+
|
173
|
+
Please use the Tidelift security contact to [report a security vulnerability].
|
174
|
+
Tidelift will coordinate the fix and disclosure.
|
175
|
+
|
176
|
+
## Credits
|
177
|
+
|
178
|
+
Everybody who has ever contributed to this forked and reforked piece of
|
179
|
+
software, especially:
|
180
|
+
|
181
|
+
* @ko1, author of the awesome TracePoint API for Ruby.
|
182
|
+
* @cldwalker, [debugger]'s maintainer.
|
183
|
+
* @denofevil, author of [debase], the starting point of this.
|
184
|
+
* @kevjames3 for testing, bug reports and the interest in the project.
|
185
|
+
* @FooBarWidget for working and helping with remote debugging.
|
186
|
+
|
187
|
+
[debugger]: https://github.com/cldwalker/debugger
|
188
|
+
[pry]: https://github.com/pry/pry
|
189
|
+
[debase]: https://github.com/denofevil/debase
|
190
|
+
[pry-byebug]: https://github.com/deivid-rodriguez/pry-byebug
|
191
|
+
[ruby-debug-passenger]: https://github.com/davejamesmiller/ruby-debug-passenger
|
192
|
+
[minitest-byebug]: https://github.com/kaspth/minitest-byebug
|
193
|
+
[sublime_debugger]: https://github.com/shuky19/sublime_debugger
|
194
|
+
[atom-byebug]: https://github.com/izaera/atom-byebug
|
195
|
+
[Liberapay]: https://liberapay.com/byebug/donate
|
196
|
+
[Tidelift]: https://tidelift.com/subscription/pkg/rubygems-byebug?utm_source=rubygems-byebug&utm_medium=readme_text
|
197
|
+
[Tidelift for enterprise]: https://tidelift.com/subscription/pkg/rubygems-byebug?utm_source=rubygems-byebug&utm_medium=referral&utm_campaign=github&utm_content=enterprise
|
198
|
+
[Tidelift support]: https://tidelift.com/subscription/pkg/rubygems-byebug?utm_source=rubygems-byebug&utm_medium=referral&utm_campaign=github&utm_content=support
|
199
|
+
[report a security vulnerability]: https://tidelift.com/security
|