pry-byebug 3.3.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +74 -71
- data/README.md +20 -13
- data/lib/byebug/processors/pry_processor.rb +15 -1
- data/lib/pry-byebug/base.rb +1 -1
- data/lib/pry-byebug/commands.rb +1 -0
- data/lib/pry-byebug/commands/backtrace.rb +29 -0
- data/lib/pry-byebug/commands/breakpoint.rb +1 -1
- data/lib/pry-byebug/pry_ext.rb +2 -2
- data/lib/pry-byebug/pry_remote_ext.rb +3 -3
- data/lib/pry-byebug/version.rb +2 -1
- data/lib/pry/byebug/breakpoints.rb +4 -4
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7ccdf30b01d3da08853340f1ebcfece6fa15f37
|
4
|
+
data.tar.gz: fd2d3a518fc219cba6127cea742feb72f1bd7d17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba6de59e8732c7a8d6cdf5f3f46b3d5803c4d75c04ea7e1d934680d926516021dc06928b043587aca86cdeaad035c847417eeffe0394bf361419ee8988ad68d0
|
7
|
+
data.tar.gz: cc83d46530c56cf1ecf12581271fc66709570813f22406b0a293c704093f826107a2d091f34f9aec10d608739f883baa96a3cd4cc9af32057c23301d91743622
|
data/CHANGELOG.md
CHANGED
@@ -1,144 +1,147 @@
|
|
1
|
-
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
## Master (Unreleased)
|
4
|
+
|
5
|
+
## 3.4.0 (2016-05-15)
|
2
6
|
|
3
|
-
|
4
|
-
* Up to date dependencies, including byebug 8.0 series.
|
5
|
-
* Faster debugger thanks to @k0kubun (#80).
|
7
|
+
### Fixed
|
6
8
|
|
7
|
-
|
8
|
-
* Fix encoding error in gemspec file (#70).
|
9
|
+
* Byebug 9 compatibility.
|
9
10
|
|
11
|
+
### Added
|
12
|
+
|
13
|
+
* A new `backtrace` command.
|
14
|
+
|
15
|
+
## 3.3.0 (2015-11-05)
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
* Byebug 8 compatibility.
|
20
|
+
* Fix encoding error in gemspec file (#70).
|
21
|
+
* Debugger being too slow (#80, thanks @k0kubun).
|
10
22
|
|
11
23
|
## 3.2.0 (2015-07-18)
|
12
24
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
* Up to date dependencies.
|
25
|
+
### Added
|
26
|
+
|
27
|
+
* `continue` can now receive a line number argument (#56).
|
17
28
|
|
18
|
-
|
19
|
-
* Don't conflict with `break` and `next` Ruby keywords inside multiline
|
20
|
-
statements (#44).
|
29
|
+
### Fixed
|
21
30
|
|
22
|
-
|
23
|
-
|
31
|
+
* Conflicts with `break` and `next` Ruby keywords inside multiline statements
|
32
|
+
(#44).
|
24
33
|
|
34
|
+
### Removed
|
35
|
+
|
36
|
+
* `breaks` command. It was broken anyways (#47).
|
25
37
|
|
26
38
|
## 3.1.0 (2015-04-14)
|
27
39
|
|
28
|
-
|
29
|
-
* Add frame nav commands up, down and frame.
|
40
|
+
### Added
|
30
41
|
|
42
|
+
* Frame navigation commands `up`, `down` and `frame`.
|
31
43
|
|
32
44
|
## 3.0.1 (2015-04-02)
|
33
45
|
|
34
|
-
|
35
|
-
* Fix several formatting and alignment issues.
|
46
|
+
### Fixed
|
36
47
|
|
48
|
+
* Several formatting and alignment issues.
|
37
49
|
|
38
50
|
## 3.0.0 (2015-02-02)
|
39
51
|
|
40
|
-
|
41
|
-
* Adds RuboCop to enforce a consistent code style.
|
42
|
-
* Several refactorings to keep code simpler.
|
52
|
+
### Fixed
|
43
53
|
|
44
|
-
|
45
|
-
|
46
|
-
line of a method/block.
|
54
|
+
* `binding.pry` would not stop at the correct place when called at the last
|
55
|
+
line of a method/block.
|
47
56
|
|
48
|
-
|
49
|
-
* Stepping aliases for `next` (`n`), `step` (`s`), `finish` (`f`) and
|
50
|
-
`continue` (`c`). See #34.
|
57
|
+
### Removed
|
51
58
|
|
59
|
+
* Stepping aliases for `next` (`n`), `step` (`s`), `finish` (`f`) and `continue`
|
60
|
+
(`c`). See #34.
|
52
61
|
|
53
62
|
## 2.0.0 (2014-01-09)
|
54
63
|
|
55
|
-
|
56
|
-
* Compatibility with byebug 3
|
57
|
-
* Now pry starts at the first line after binding.pry, not at binding.pry
|
58
|
-
- Bugfixes:
|
59
|
-
* 'continue' doesn't finish pry instance (issue #13)
|
64
|
+
### Fixed
|
60
65
|
|
66
|
+
* Byebug 3 compatibility.
|
67
|
+
* Pry not starting at the first line after `binding.pry` but at `binding.pry`.
|
68
|
+
* `continue` not finishing pry instance (#13).
|
61
69
|
|
62
70
|
## 1.3.3 (2014-25-06)
|
63
71
|
|
64
|
-
|
65
|
-
level releases.
|
72
|
+
### Fixed
|
66
73
|
|
74
|
+
* Pry 0.10 series and further minor version level releases compatibility.
|
67
75
|
|
68
76
|
## 1.3.2 (2014-24-02)
|
69
77
|
|
70
|
-
|
78
|
+
### Fixed
|
71
79
|
|
80
|
+
* Bug inherited from `byebug`.
|
72
81
|
|
73
82
|
## 1.3.1 (2014-08-02)
|
74
83
|
|
75
|
-
|
84
|
+
### Fixed
|
76
85
|
|
86
|
+
* Bug #22 (thanks @andreychernih).
|
77
87
|
|
78
88
|
## 1.3.0 (2014-05-02)
|
79
89
|
|
80
|
-
|
81
|
-
|
90
|
+
### Added
|
91
|
+
|
92
|
+
* Breakpoints on method names (thanks @andreychernih & @palkan).
|
93
|
+
|
94
|
+
### Fixed
|
82
95
|
|
96
|
+
* "Undefined method `interface`" error (huge thanks to @andreychernih).
|
83
97
|
|
84
98
|
## 1.2.1 (2013-30-12)
|
85
99
|
|
86
|
-
|
100
|
+
### Fixed
|
87
101
|
|
102
|
+
* "Uncaught throw :breakout_nav" error (thanks @lukebergen).
|
88
103
|
|
89
104
|
## 1.2.0 (2013-24-09)
|
90
105
|
|
91
|
-
|
106
|
+
### Fixed
|
92
107
|
|
108
|
+
* Compatibility with byebug's 2.x series
|
93
109
|
|
94
110
|
## 1.1.2 (2013-11-07)
|
95
111
|
|
96
|
-
|
112
|
+
### Fixed
|
97
113
|
|
114
|
+
* Compatibility with backwards compatible byebug versions.
|
98
115
|
|
99
116
|
## 1.1.1 (2013-02-07)
|
100
117
|
|
101
|
-
|
102
|
-
* Fixes bug when doing "step n" or "next n" where n > 1 right after binding.pry
|
118
|
+
### Fixed
|
103
119
|
|
120
|
+
* Bug when doing `step n` or `next n` where n > 1 right after `binding.pry`.
|
104
121
|
|
105
122
|
## 1.1.0 (2013-06-06)
|
106
123
|
|
107
|
-
|
108
|
-
* Uses byebug ~> 1.4.0
|
109
|
-
* Uses s, n, f and c aliases by default (thanks @jgakos!)
|
110
|
-
|
111
|
-
|
112
|
-
## 1.0.0, 1.0.1 (2013-05-07)
|
113
|
-
|
114
|
-
* Forked from [pry-debugger](https://github.com/nixme/pry-debugger) to support
|
115
|
-
byebug
|
116
|
-
* Dropped pry-remote support
|
117
|
-
|
124
|
+
### Added
|
118
125
|
|
119
|
-
|
126
|
+
* `s`, `n`, `f` and `c` aliases (thanks @jgakos!).
|
120
127
|
|
121
|
-
|
128
|
+
## 1.0.1 (2013-05-07)
|
122
129
|
|
130
|
+
### Fixed
|
123
131
|
|
124
|
-
|
132
|
+
* Unwanted debugging printf.
|
125
133
|
|
126
|
-
|
127
|
-
* Fix support for specifying breakpoints by *file:line_number*. (@nviennot)
|
128
|
-
* Validate breakpoint conditionals are real Ruby expressions.
|
129
|
-
* Support for debugger ~> 1.2.0. (@jshou)
|
130
|
-
* Safer `alias_method_chain`-style patching of `Pry.start` and
|
131
|
-
`PryRemote::Server#teardown`. (@benizi)
|
134
|
+
## 1.0.0 (2013-05-07)
|
132
135
|
|
136
|
+
### Added
|
133
137
|
|
134
|
-
|
138
|
+
* Initial release forked from
|
139
|
+
[pry-debugger](https://github.com/nixme/pry-debugger) to support byebug.
|
135
140
|
|
136
|
-
|
137
|
-
* **finish** command
|
138
|
-
* Internal cleanup and bug fixes
|
141
|
+
### Removed
|
139
142
|
|
143
|
+
* pry-remote support.
|
140
144
|
|
141
|
-
##
|
145
|
+
## Older releases
|
142
146
|
|
143
|
-
*
|
144
|
-
[pry-remote 0.1.4][pry-remote] support.
|
147
|
+
* Check [pry-debugger](https://github.com/nixme/pry-debugger)'s CHANGELOG.
|
data/README.md
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
# pry-byebug
|
2
|
+
|
2
3
|
[![Version][VersionBadge]][VersionURL]
|
3
4
|
[![Build][TravisBadge]][TravisURL]
|
4
5
|
[![Inline docs][InchCIBadge]][InchCIURL]
|
5
6
|
[![Gittip][GittipBadge]][GittipURL]
|
6
7
|
[![Coverage][CoverageBadge]][CoverageURL]
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
Adds **step**, **next**, **finish** and **continue** commands and
|
11
|
-
**breakpoints** to [Pry][pry] using [byebug][byebug].
|
9
|
+
Adds step-by-step debugging and stack navigation capabilities to [pry][] using
|
10
|
+
[byebug][].
|
12
11
|
|
13
12
|
To use, invoke pry normally. No need to start your script or app differently.
|
14
13
|
Execution will stop in the first statement after your `binding.pry`.
|
@@ -27,12 +26,12 @@ puts 'Goodbye World' # Run 'next' in the console to move here.
|
|
27
26
|
## Requirements
|
28
27
|
|
29
28
|
* Required: MRI 2.0.0 or higher. For debugging ruby 1.9.3 or older, use
|
30
|
-
[pry-debugger][].
|
29
|
+
[pry-debugger][].
|
31
30
|
|
32
31
|
* Recommended:
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
* MRI 2.1.8 or higher.
|
33
|
+
* MRI 2.2.4 or higher.
|
34
|
+
* MRI 2.3.0 or higher.
|
36
35
|
|
37
36
|
## Installation
|
38
37
|
|
@@ -46,11 +45,14 @@ in your Gemfile and run
|
|
46
45
|
|
47
46
|
bundle install
|
48
47
|
|
49
|
-
|
50
|
-
to use it to debug your tests!
|
48
|
+
Make sure you include the gem globally or inside the `:test` group if you plan
|
49
|
+
to use it to debug your tests!
|
51
50
|
|
51
|
+
## Commands
|
52
52
|
|
53
|
-
|
53
|
+
### Step-by-step debugging
|
54
|
+
|
55
|
+
**break:** Manage breakpoints.
|
54
56
|
|
55
57
|
**step:** Step execution into the next line or method. Takes an optional numeric
|
56
58
|
argument to step multiple times.
|
@@ -62,6 +64,11 @@ optional numeric argument to step multiple lines.
|
|
62
64
|
|
63
65
|
**continue:** Continue program execution and end the Pry session.
|
64
66
|
|
67
|
+
### Callstack navigation
|
68
|
+
|
69
|
+
**backtrace:** Shows the current stack. You can use the numbers on the left
|
70
|
+
side with the `frame` command to navigate the stack.
|
71
|
+
|
65
72
|
**up:** Moves the stack frame up. Takes an optional numeric argument to move
|
66
73
|
multiple frames.
|
67
74
|
|
@@ -133,8 +140,8 @@ Type `break --help` from a Pry session to see all available options.
|
|
133
140
|
## Credits
|
134
141
|
|
135
142
|
* Gopal Patel (@nixme), creator of [pry-debugger][], and everybody who
|
136
|
-
contributed to it. pry-byebug is a fork of pry-debugger so it wouldn't exist as
|
137
|
-
it is without those contributions.
|
143
|
+
contributed to it. pry-byebug is a fork of pry-debugger so it wouldn't exist as
|
144
|
+
it is without those contributions.
|
138
145
|
* John Mair (@banister), creator of [pry][].
|
139
146
|
|
140
147
|
Patches and bug reports are welcome.
|
@@ -41,7 +41,15 @@ module Byebug
|
|
41
41
|
# Set up a number of navigational commands to be performed by Byebug.
|
42
42
|
#
|
43
43
|
def perform(action, options = {})
|
44
|
-
return unless %i(
|
44
|
+
return unless %i(
|
45
|
+
backtrace
|
46
|
+
down
|
47
|
+
finish
|
48
|
+
frame
|
49
|
+
next
|
50
|
+
step
|
51
|
+
up
|
52
|
+
).include?(action)
|
45
53
|
|
46
54
|
send("perform_#{action}", options)
|
47
55
|
end
|
@@ -109,6 +117,12 @@ module Byebug
|
|
109
117
|
end
|
110
118
|
end
|
111
119
|
|
120
|
+
def perform_backtrace(_options)
|
121
|
+
Byebug::WhereCommand.new(self, 'backtrace').execute
|
122
|
+
|
123
|
+
resume_pry
|
124
|
+
end
|
125
|
+
|
112
126
|
def perform_next(options)
|
113
127
|
lines = (options[:lines] || 1).to_i
|
114
128
|
context.step_over(lines, frame.pos)
|
data/lib/pry-byebug/base.rb
CHANGED
@@ -16,7 +16,7 @@ module PryByebug
|
|
16
16
|
#
|
17
17
|
def check_file_context(target, e = nil)
|
18
18
|
e ||= 'Cannot find local context. Did you use `binding.pry`?'
|
19
|
-
|
19
|
+
raise(Pry::CommandError, e) unless file_context?(target)
|
20
20
|
end
|
21
21
|
module_function :check_file_context
|
22
22
|
|
data/lib/pry-byebug/commands.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'pry-byebug/helpers/navigation'
|
2
|
+
|
3
|
+
module PryByebug
|
4
|
+
#
|
5
|
+
# Display the current stack
|
6
|
+
#
|
7
|
+
class BacktraceCommand < Pry::ClassCommand
|
8
|
+
include Helpers::Navigation
|
9
|
+
|
10
|
+
match 'backtrace'
|
11
|
+
group 'Byebug'
|
12
|
+
|
13
|
+
description 'Display the current stack.'
|
14
|
+
|
15
|
+
banner <<-BANNER
|
16
|
+
Usage: backtrace
|
17
|
+
|
18
|
+
Display the current stack.
|
19
|
+
BANNER
|
20
|
+
|
21
|
+
def process
|
22
|
+
PryByebug.check_file_context(target)
|
23
|
+
|
24
|
+
breakout_navigation :backtrace
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
Pry::Commands.add_command(PryByebug::BacktraceCommand)
|
data/lib/pry-byebug/pry_ext.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'byebug/processors/pry_processor'
|
2
2
|
|
3
3
|
class << Pry
|
4
|
-
|
4
|
+
alias start_without_pry_byebug start
|
5
5
|
|
6
6
|
def start_with_pry_byebug(target = TOPLEVEL_BINDING, options = {})
|
7
7
|
if target.is_a?(Binding) && PryByebug.file_context?(target)
|
@@ -12,5 +12,5 @@ class << Pry
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
|
15
|
+
alias start start_with_pry_byebug
|
16
16
|
end
|
@@ -10,7 +10,7 @@ module PryRemote
|
|
10
10
|
# teardown the server right after Pry.start finishes.
|
11
11
|
#
|
12
12
|
def run
|
13
|
-
|
13
|
+
raise('Already running a pry-remote session!') if
|
14
14
|
PryByebug.current_remote_server
|
15
15
|
|
16
16
|
PryByebug.current_remote_server = self
|
@@ -22,7 +22,7 @@ module PryRemote
|
|
22
22
|
#
|
23
23
|
# Override to reset our saved global current server session.
|
24
24
|
#
|
25
|
-
|
25
|
+
alias teardown_without_pry_byebug teardown
|
26
26
|
def teardown_with_pry_byebug
|
27
27
|
return if @torn
|
28
28
|
|
@@ -30,7 +30,7 @@ module PryRemote
|
|
30
30
|
PryByebug.current_remote_server = nil
|
31
31
|
@torn = true
|
32
32
|
end
|
33
|
-
|
33
|
+
alias teardown teardown_with_pry_byebug
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
data/lib/pry-byebug/version.rb
CHANGED
@@ -60,7 +60,7 @@ class Pry
|
|
60
60
|
#
|
61
61
|
def add_file(file, line, expression = nil)
|
62
62
|
real_file = (file != Pry.eval_path)
|
63
|
-
|
63
|
+
raise(ArgumentError, 'Invalid file!') if real_file && !File.exist?(file)
|
64
64
|
validate_expression expression
|
65
65
|
|
66
66
|
path = (real_file ? File.expand_path(file) : file)
|
@@ -89,7 +89,7 @@ class Pry
|
|
89
89
|
::Byebug::Breakpoint.remove(id) &&
|
90
90
|
breakpoints.delete(find_by_id(id))
|
91
91
|
|
92
|
-
|
92
|
+
raise(ArgumentError, "No breakpoint ##{id}") unless deleted
|
93
93
|
end
|
94
94
|
|
95
95
|
#
|
@@ -141,7 +141,7 @@ class Pry
|
|
141
141
|
|
142
142
|
def find_by_id(id)
|
143
143
|
breakpoint = find { |b| b.id == id }
|
144
|
-
|
144
|
+
raise(ArgumentError, "No breakpoint ##{id}!") unless breakpoint
|
145
145
|
breakpoint
|
146
146
|
end
|
147
147
|
|
@@ -157,7 +157,7 @@ class Pry
|
|
157
157
|
valid = exp && (exp.empty? || !Pry::Code.complete_expression?(exp))
|
158
158
|
return unless valid
|
159
159
|
|
160
|
-
|
160
|
+
raise("Invalid breakpoint conditional: #{expression}")
|
161
161
|
end
|
162
162
|
end
|
163
163
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-byebug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Rodríguez
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pry
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '9.0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '9.0'
|
42
42
|
description: |-
|
43
43
|
Combine 'pry' with 'byebug'. Adds 'step', 'next', 'finish',
|
44
44
|
'continue' and 'break' commands to control execution.
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- lib/pry-byebug/base.rb
|
58
58
|
- lib/pry-byebug/cli.rb
|
59
59
|
- lib/pry-byebug/commands.rb
|
60
|
+
- lib/pry-byebug/commands/backtrace.rb
|
60
61
|
- lib/pry-byebug/commands/breakpoint.rb
|
61
62
|
- lib/pry-byebug/commands/continue.rb
|
62
63
|
- lib/pry-byebug/commands/down.rb
|
@@ -94,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
95
|
version: '0'
|
95
96
|
requirements: []
|
96
97
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
98
|
+
rubygems_version: 2.5.1
|
98
99
|
signing_key:
|
99
100
|
specification_version: 4
|
100
101
|
summary: Fast debugging with Pry.
|