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.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +954 -0
  3. data/CONTRIBUTING.md +58 -0
  4. data/GUIDE.md +1806 -0
  5. data/LICENSE +23 -0
  6. data/README.md +199 -0
  7. data/exe/byebug +6 -0
  8. data/ext/byebug/breakpoint.c +521 -0
  9. data/ext/byebug/byebug.c +900 -0
  10. data/ext/byebug/byebug.h +145 -0
  11. data/ext/byebug/context.c +687 -0
  12. data/ext/byebug/extconf.rb +12 -0
  13. data/ext/byebug/locker.c +96 -0
  14. data/ext/byebug/threads.c +241 -0
  15. data/lib/byebug/attacher.rb +48 -0
  16. data/lib/byebug/breakpoint.rb +94 -0
  17. data/lib/byebug/command.rb +111 -0
  18. data/lib/byebug/command_list.rb +34 -0
  19. data/lib/byebug/commands/break.rb +114 -0
  20. data/lib/byebug/commands/catch.rb +78 -0
  21. data/lib/byebug/commands/condition.rb +55 -0
  22. data/lib/byebug/commands/continue.rb +68 -0
  23. data/lib/byebug/commands/debug.rb +38 -0
  24. data/lib/byebug/commands/delete.rb +55 -0
  25. data/lib/byebug/commands/disable/breakpoints.rb +42 -0
  26. data/lib/byebug/commands/disable/display.rb +43 -0
  27. data/lib/byebug/commands/disable.rb +33 -0
  28. data/lib/byebug/commands/display.rb +66 -0
  29. data/lib/byebug/commands/down.rb +45 -0
  30. data/lib/byebug/commands/edit.rb +69 -0
  31. data/lib/byebug/commands/enable/breakpoints.rb +42 -0
  32. data/lib/byebug/commands/enable/display.rb +43 -0
  33. data/lib/byebug/commands/enable.rb +33 -0
  34. data/lib/byebug/commands/finish.rb +57 -0
  35. data/lib/byebug/commands/frame.rb +57 -0
  36. data/lib/byebug/commands/help.rb +64 -0
  37. data/lib/byebug/commands/history.rb +39 -0
  38. data/lib/byebug/commands/info/breakpoints.rb +65 -0
  39. data/lib/byebug/commands/info/display.rb +49 -0
  40. data/lib/byebug/commands/info/file.rb +80 -0
  41. data/lib/byebug/commands/info/line.rb +35 -0
  42. data/lib/byebug/commands/info/program.rb +49 -0
  43. data/lib/byebug/commands/info.rb +37 -0
  44. data/lib/byebug/commands/interrupt.rb +34 -0
  45. data/lib/byebug/commands/irb.rb +50 -0
  46. data/lib/byebug/commands/kill.rb +45 -0
  47. data/lib/byebug/commands/list.rb +159 -0
  48. data/lib/byebug/commands/method.rb +53 -0
  49. data/lib/byebug/commands/next.rb +40 -0
  50. data/lib/byebug/commands/pry.rb +41 -0
  51. data/lib/byebug/commands/quit.rb +42 -0
  52. data/lib/byebug/commands/restart.rb +64 -0
  53. data/lib/byebug/commands/save.rb +72 -0
  54. data/lib/byebug/commands/set.rb +79 -0
  55. data/lib/byebug/commands/show.rb +45 -0
  56. data/lib/byebug/commands/skip.rb +85 -0
  57. data/lib/byebug/commands/source.rb +40 -0
  58. data/lib/byebug/commands/step.rb +40 -0
  59. data/lib/byebug/commands/thread/current.rb +37 -0
  60. data/lib/byebug/commands/thread/list.rb +43 -0
  61. data/lib/byebug/commands/thread/resume.rb +45 -0
  62. data/lib/byebug/commands/thread/stop.rb +43 -0
  63. data/lib/byebug/commands/thread/switch.rb +46 -0
  64. data/lib/byebug/commands/thread.rb +34 -0
  65. data/lib/byebug/commands/tracevar.rb +54 -0
  66. data/lib/byebug/commands/undisplay.rb +51 -0
  67. data/lib/byebug/commands/untracevar.rb +36 -0
  68. data/lib/byebug/commands/up.rb +45 -0
  69. data/lib/byebug/commands/var/all.rb +41 -0
  70. data/lib/byebug/commands/var/args.rb +39 -0
  71. data/lib/byebug/commands/var/const.rb +49 -0
  72. data/lib/byebug/commands/var/global.rb +37 -0
  73. data/lib/byebug/commands/var/instance.rb +39 -0
  74. data/lib/byebug/commands/var/local.rb +39 -0
  75. data/lib/byebug/commands/var.rb +37 -0
  76. data/lib/byebug/commands/where.rb +64 -0
  77. data/lib/byebug/commands.rb +40 -0
  78. data/lib/byebug/context.rb +157 -0
  79. data/lib/byebug/core.rb +115 -0
  80. data/lib/byebug/errors.rb +29 -0
  81. data/lib/byebug/frame.rb +185 -0
  82. data/lib/byebug/helpers/bin.rb +47 -0
  83. data/lib/byebug/helpers/eval.rb +134 -0
  84. data/lib/byebug/helpers/file.rb +63 -0
  85. data/lib/byebug/helpers/frame.rb +75 -0
  86. data/lib/byebug/helpers/parse.rb +80 -0
  87. data/lib/byebug/helpers/path.rb +40 -0
  88. data/lib/byebug/helpers/reflection.rb +19 -0
  89. data/lib/byebug/helpers/string.rb +33 -0
  90. data/lib/byebug/helpers/thread.rb +67 -0
  91. data/lib/byebug/helpers/toggle.rb +62 -0
  92. data/lib/byebug/helpers/var.rb +70 -0
  93. data/lib/byebug/history.rb +130 -0
  94. data/lib/byebug/interface.rb +146 -0
  95. data/lib/byebug/interfaces/local_interface.rb +63 -0
  96. data/lib/byebug/interfaces/remote_interface.rb +50 -0
  97. data/lib/byebug/interfaces/script_interface.rb +33 -0
  98. data/lib/byebug/interfaces/test_interface.rb +67 -0
  99. data/lib/byebug/option_setter.rb +95 -0
  100. data/lib/byebug/printers/base.rb +68 -0
  101. data/lib/byebug/printers/plain.rb +44 -0
  102. data/lib/byebug/printers/texts/base.yml +115 -0
  103. data/lib/byebug/printers/texts/plain.yml +33 -0
  104. data/lib/byebug/processors/command_processor.rb +173 -0
  105. data/lib/byebug/processors/control_processor.rb +24 -0
  106. data/lib/byebug/processors/post_mortem_processor.rb +18 -0
  107. data/lib/byebug/processors/script_processor.rb +49 -0
  108. data/lib/byebug/remote/client.rb +57 -0
  109. data/lib/byebug/remote/server.rb +47 -0
  110. data/lib/byebug/remote.rb +85 -0
  111. data/lib/byebug/runner.rb +198 -0
  112. data/lib/byebug/setting.rb +79 -0
  113. data/lib/byebug/settings/autoirb.rb +29 -0
  114. data/lib/byebug/settings/autolist.rb +29 -0
  115. data/lib/byebug/settings/autopry.rb +29 -0
  116. data/lib/byebug/settings/autosave.rb +17 -0
  117. data/lib/byebug/settings/basename.rb +16 -0
  118. data/lib/byebug/settings/callstyle.rb +20 -0
  119. data/lib/byebug/settings/fullpath.rb +16 -0
  120. data/lib/byebug/settings/histfile.rb +20 -0
  121. data/lib/byebug/settings/histsize.rb +20 -0
  122. data/lib/byebug/settings/linetrace.rb +22 -0
  123. data/lib/byebug/settings/listsize.rb +21 -0
  124. data/lib/byebug/settings/post_mortem.rb +27 -0
  125. data/lib/byebug/settings/savefile.rb +20 -0
  126. data/lib/byebug/settings/stack_on_error.rb +15 -0
  127. data/lib/byebug/settings/width.rb +20 -0
  128. data/lib/byebug/source_file_formatter.rb +71 -0
  129. data/lib/byebug/subcommands.rb +54 -0
  130. data/lib/byebug/version.rb +8 -0
  131. data/lib/byebug.rb +3 -0
  132. 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
+ ![ubuntu](https://github.com/deivid-rodriguez/byebug/workflows/ubuntu/badge.svg)
40
+ ![windows](https://github.com/deivid-rodriguez/byebug/workflows/windows/badge.svg)
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
data/exe/byebug ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "byebug/runner"
5
+
6
+ Byebug::Runner.new.run