debug 1.0.0.beta1 → 1.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -15
- data/ext/debug/extconf.rb +1 -1
- data/lib/debug/breakpoint.rb +1 -1
- data/lib/debug/config.rb +4 -4
- data/lib/debug/session.rb +3 -3
- data/lib/debug/version.rb +1 -1
- data/misc/README.md.erb +8 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0ed57ff87f1864d86d79c435081b12df6cb35bd4f24a3cb79f4a909887e5f41
|
4
|
+
data.tar.gz: c342d515e9358e0cfdee353b5d5be1fbbb7bcf46cfdf3f925ace7a3acc2b6e90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 112d49a60540e034752e1c3d3721c213549cae4653c63041c3f3da08cf7bf01624e8a45c0ee88ff31270eef337cf8db3ca8de7d403eea550aff82621050e9e14
|
7
|
+
data.tar.gz: e6800fb760a734419ed43fa04720b0bc75a815f0de4511df7f76a44b9b864c002eb6c9503f74e1a9471d335f671f0db12636e852cc6bac0366ba00d051e29b0b
|
data/README.md
CHANGED
@@ -74,7 +74,7 @@ $ ruby target.rb
|
|
74
74
|
```
|
75
75
|
|
76
76
|
When you run the program with the debug console, you will see the debug console prompt `(rdbg)`.
|
77
|
-
The debuggee program (`target.rb`) is suspended at the
|
77
|
+
The debuggee program (`target.rb`) is suspended at the beginning of `target.rb`.
|
78
78
|
|
79
79
|
You can type any debugger's command described bellow. "c" or "continue" resume the debuggee program.
|
80
80
|
You can suspend the debuggee program and show the debug console with `Ctrl-C`.
|
@@ -137,7 +137,7 @@ $ rdbg ~/src/rb/target.rb
|
|
137
137
|
b => 2
|
138
138
|
c => 3
|
139
139
|
|
140
|
-
(rdbg) c #
|
140
|
+
(rdbg) c # Continue the program ("c" is a short name of "continue")
|
141
141
|
[6]
|
142
142
|
```
|
143
143
|
|
@@ -173,12 +173,12 @@ Debugger can attach via UNIX domain socket (/home/ko1/.ruby-debug-sock/ruby-debu
|
|
173
173
|
```
|
174
174
|
|
175
175
|
It runs target.rb and accept debugger connection within UNIX domain socket.
|
176
|
-
The debuggee process waits for debugger connection at the
|
176
|
+
The debuggee process waits for debugger connection at the beginning of `target.rb` like that:
|
177
177
|
|
178
178
|
```
|
179
179
|
$ rdbg -O ~/src/rb/target.rb
|
180
180
|
DEBUGGER: Debugger can attach via UNIX domain socket (/home/ko1/.ruby-debug-sock/ruby-debug-ko1-29828)
|
181
|
-
DEBUGGER: wait for
|
181
|
+
DEBUGGER: wait for debugger connection...
|
182
182
|
```
|
183
183
|
|
184
184
|
You can attach the program with the following command:
|
@@ -204,7 +204,7 @@ and you can input any debug commands. `c` (or `continue`) continues the debuggee
|
|
204
204
|
You can detach the debugger from the debugger process with `quit` command.
|
205
205
|
You can re-connect to the debuggee process by `rdbg -A` command again, and the debuggee process suspends the execution (and debugger can input any debug commands).
|
206
206
|
|
207
|
-
If you don't want to stop the debuggee process at the
|
207
|
+
If you don't want to stop the debuggee process at the beginning of debuggee process (`target.rb`), you can use the following to specify "non-stop" option.
|
208
208
|
|
209
209
|
* Use `rdbg -n` option
|
210
210
|
* Set the environment variable `RUBY_DEBUG_NONSTOP=1`
|
@@ -282,7 +282,7 @@ $ rdbg --attach hostname 12345
|
|
282
282
|
|
283
283
|
If there are `.rdbgrc` files are there at the current directory and the home directory, files are loaded as initial scripts which contains debugger commands. `RUBY_DEBUG_INIT_SCRIPT` environment variable can specify the initial script file.
|
284
284
|
|
285
|
-
Initial scripts are
|
285
|
+
Initial scripts are evaluated at the first suspend timing (generally, it is the beginning of the target script). For example, you can set break points with `break file:123`.
|
286
286
|
|
287
287
|
If there are `.rdbgrc.rb` files at the current directory and the home directory, files are loaded as a ruby script at the initializing timing.
|
288
288
|
|
@@ -290,7 +290,7 @@ If there are `.rdbgrc.rb` files at the current directory and the home directory,
|
|
290
290
|
|
291
291
|
You can control debuggee's behavior with environment variables:
|
292
292
|
|
293
|
-
* `RUBY_DEBUG_NONSTOP`: 1 for nonstop at the
|
293
|
+
* `RUBY_DEBUG_NONSTOP`: 1 for nonstop at the beginning of program.
|
294
294
|
* `RUBY_DEBUG_INIT_SCRIPT`: Initial script path loaded at the first stop.
|
295
295
|
* `RUBY_DEBUG_COMMANDS`: Debug commands invoked at the first stop. Commands should be separated by ';;'.
|
296
296
|
* `RUBY_DEBUG_SHOW_SRC_LINES`: Show n lines source code on breakpoint (default: 10 lines).
|
@@ -308,7 +308,7 @@ You can control debuggee's behavior with environment variables:
|
|
308
308
|
* [debug command compare sheet - Google Sheets](https://docs.google.com/spreadsheets/d/1TlmmUDsvwK4sSIyoMv-io52BUUz__R5wpu-ComXlsw0/edit?usp=sharing)
|
309
309
|
|
310
310
|
You can use the following debug commands. Each command should be written in 1 line.
|
311
|
-
The `[...]` notation means this part can be
|
311
|
+
The `[...]` notation means this part can be eliminate. For example, `s[tep]` means `s` or `step` are valid command. `ste` is not valid.
|
312
312
|
The `<...>` notation means the argument.
|
313
313
|
|
314
314
|
### Control flow
|
@@ -366,7 +366,7 @@ The `<...>` notation means the argument.
|
|
366
366
|
* Show current frame's source code from the line <start> to <end> if given.
|
367
367
|
* `edit`
|
368
368
|
* Open the current file on the editor (use `EDITOR` environment variable).
|
369
|
-
* Note that
|
369
|
+
* Note that edited file will not be reloaded.
|
370
370
|
* `edit <file>`
|
371
371
|
* Open <file> on the editor.
|
372
372
|
* `i[nfo]`
|
@@ -390,7 +390,7 @@ The `<...>` notation means the argument.
|
|
390
390
|
* `f[rame]`
|
391
391
|
* Show current frame.
|
392
392
|
* `f[rame] <framenum>`
|
393
|
-
* Specify frame. Evaluation are run on this frame
|
393
|
+
* Specify frame. Evaluation are run on this frame environment.
|
394
394
|
* `up`
|
395
395
|
* Specify upper frame.
|
396
396
|
* `down`
|
@@ -428,9 +428,9 @@ The `<...>` notation means the argument.
|
|
428
428
|
exe/rdbg [options] -- [debuggee options]
|
429
429
|
|
430
430
|
Debug console mode:
|
431
|
-
-n, --nonstop Do not stop at the
|
432
|
-
-e [COMMAND] execute debug command at the
|
433
|
-
-O, --open Start debuggee with
|
431
|
+
-n, --nonstop Do not stop at the beginning of the script.
|
432
|
+
-e [COMMAND] execute debug command at the beginning of the script.
|
433
|
+
-O, --open Start debuggee with opening the debugger port.
|
434
434
|
If TCP/IP options are not given,
|
435
435
|
a UNIX domain socket will be used.
|
436
436
|
--port=[PORT] Listening TCP/IP port
|
@@ -454,11 +454,10 @@ Attach mode:
|
|
454
454
|
debugger connection, list possible debuggee names.
|
455
455
|
'exe/rdbg -A path' tries to connect via UNIX domain socket with given path name.
|
456
456
|
'exe/rdbg -A port' tries to connect localhost:port via TCP/IP.
|
457
|
-
'exe/rdbg -A host port'
|
457
|
+
'exe/rdbg -A host port' tries to connect host:port via TCP/IP.
|
458
458
|
|
459
459
|
```
|
460
460
|
|
461
461
|
# Contributing
|
462
462
|
|
463
463
|
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/debug.
|
464
|
-
|
data/ext/debug/extconf.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
require 'mkmf'
|
2
|
-
create_makefile 'debug'
|
2
|
+
create_makefile 'debug/debug'
|
data/lib/debug/breakpoint.rb
CHANGED
@@ -123,7 +123,7 @@ module DEBUGGER__
|
|
123
123
|
def activate_exact iseq, events, line
|
124
124
|
case
|
125
125
|
when events.include?(:RUBY_EVENT_CALL)
|
126
|
-
# "def foo" line set bp on the
|
126
|
+
# "def foo" line set bp on the beginning of method foo
|
127
127
|
activate(iseq, :call, line)
|
128
128
|
when events.include?(:RUBY_EVENT_LINE)
|
129
129
|
activate(iseq, :line, line)
|
data/lib/debug/config.rb
CHANGED
@@ -65,16 +65,16 @@ module DEBUGGER__
|
|
65
65
|
o.separator ''
|
66
66
|
|
67
67
|
o.separator 'Debug console mode:'
|
68
|
-
o.on('-n', '--nonstop', 'Do not stop at the
|
68
|
+
o.on('-n', '--nonstop', 'Do not stop at the beginning of the script.') do
|
69
69
|
config[:nonstop] = '1'
|
70
70
|
end
|
71
71
|
|
72
|
-
o.on('-e [COMMAND]', 'execute debug command at the
|
72
|
+
o.on('-e [COMMAND]', 'execute debug command at the beginning of the script.') do |cmd|
|
73
73
|
config[:commands] ||= ''
|
74
74
|
config[:commands] << cmd + ';;'
|
75
75
|
end
|
76
76
|
|
77
|
-
o.on('-O', '--open', 'Start debuggee with
|
77
|
+
o.on('-O', '--open', 'Start debuggee with opening the debugger port.',
|
78
78
|
'If TCP/IP options are not given,',
|
79
79
|
'a UNIX domain socket will be used.') do
|
80
80
|
config[:remote] = true
|
@@ -109,7 +109,7 @@ module DEBUGGER__
|
|
109
109
|
o.separator " #{' ' * $0.size} debugger connection, list possible debuggee names."
|
110
110
|
o.separator " '#{$0} -A path' tries to connect via UNIX domain socket with given path name."
|
111
111
|
o.separator " '#{$0} -A port' tries to connect localhost:port via TCP/IP."
|
112
|
-
o.separator " '#{$0} -A host port'
|
112
|
+
o.separator " '#{$0} -A host port' tries to connect host:port via TCP/IP."
|
113
113
|
end
|
114
114
|
|
115
115
|
opt.parse!(argv)
|
data/lib/debug/session.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
:has_return_value, :return_value, :show_line)
|
5
5
|
end
|
6
6
|
|
7
|
-
|
7
|
+
require "debug/debug"
|
8
8
|
|
9
9
|
require_relative 'source_repository'
|
10
10
|
require_relative 'breakpoint'
|
@@ -373,7 +373,7 @@ module DEBUGGER__
|
|
373
373
|
|
374
374
|
# * `edit`
|
375
375
|
# * Open the current file on the editor (use `EDITOR` environment variable).
|
376
|
-
# * Note that
|
376
|
+
# * Note that edited file will not be reloaded.
|
377
377
|
# * `edit <file>`
|
378
378
|
# * Open <file> on the editor.
|
379
379
|
when 'edit'
|
@@ -461,7 +461,7 @@ module DEBUGGER__
|
|
461
461
|
# * `f[rame]`
|
462
462
|
# * Show current frame.
|
463
463
|
# * `f[rame] <framenum>`
|
464
|
-
# * Specify frame. Evaluation are run on this frame
|
464
|
+
# * Specify frame. Evaluation are run on this frame environment.
|
465
465
|
when 'frame', 'f'
|
466
466
|
@tc << [:frame, :set, arg]
|
467
467
|
|
data/lib/debug/version.rb
CHANGED
data/misc/README.md.erb
CHANGED
@@ -74,7 +74,7 @@ $ ruby target.rb
|
|
74
74
|
```
|
75
75
|
|
76
76
|
When you run the program with the debug console, you will see the debug console prompt `(rdbg)`.
|
77
|
-
The debuggee program (`target.rb`) is suspended at the
|
77
|
+
The debuggee program (`target.rb`) is suspended at the beginning of `target.rb`.
|
78
78
|
|
79
79
|
You can type any debugger's command described bellow. "c" or "continue" resume the debuggee program.
|
80
80
|
You can suspend the debuggee program and show the debug console with `Ctrl-C`.
|
@@ -137,7 +137,7 @@ $ rdbg ~/src/rb/target.rb
|
|
137
137
|
b => 2
|
138
138
|
c => 3
|
139
139
|
|
140
|
-
(rdbg) c #
|
140
|
+
(rdbg) c # Continue the program ("c" is a short name of "continue")
|
141
141
|
[6]
|
142
142
|
```
|
143
143
|
|
@@ -173,12 +173,12 @@ Debugger can attach via UNIX domain socket (/home/ko1/.ruby-debug-sock/ruby-debu
|
|
173
173
|
```
|
174
174
|
|
175
175
|
It runs target.rb and accept debugger connection within UNIX domain socket.
|
176
|
-
The debuggee process waits for debugger connection at the
|
176
|
+
The debuggee process waits for debugger connection at the beginning of `target.rb` like that:
|
177
177
|
|
178
178
|
```
|
179
179
|
$ rdbg -O ~/src/rb/target.rb
|
180
180
|
DEBUGGER: Debugger can attach via UNIX domain socket (/home/ko1/.ruby-debug-sock/ruby-debug-ko1-29828)
|
181
|
-
DEBUGGER: wait for
|
181
|
+
DEBUGGER: wait for debugger connection...
|
182
182
|
```
|
183
183
|
|
184
184
|
You can attach the program with the following command:
|
@@ -204,7 +204,7 @@ and you can input any debug commands. `c` (or `continue`) continues the debuggee
|
|
204
204
|
You can detach the debugger from the debugger process with `quit` command.
|
205
205
|
You can re-connect to the debuggee process by `rdbg -A` command again, and the debuggee process suspends the execution (and debugger can input any debug commands).
|
206
206
|
|
207
|
-
If you don't want to stop the debuggee process at the
|
207
|
+
If you don't want to stop the debuggee process at the beginning of debuggee process (`target.rb`), you can use the following to specify "non-stop" option.
|
208
208
|
|
209
209
|
* Use `rdbg -n` option
|
210
210
|
* Set the environment variable `RUBY_DEBUG_NONSTOP=1`
|
@@ -282,7 +282,7 @@ $ rdbg --attach hostname 12345
|
|
282
282
|
|
283
283
|
If there are `.rdbgrc` files are there at the current directory and the home directory, files are loaded as initial scripts which contains debugger commands. `RUBY_DEBUG_INIT_SCRIPT` environment variable can specify the initial script file.
|
284
284
|
|
285
|
-
Initial scripts are
|
285
|
+
Initial scripts are evaluated at the first suspend timing (generally, it is the beginning of the target script). For example, you can set break points with `break file:123`.
|
286
286
|
|
287
287
|
If there are `.rdbgrc.rb` files at the current directory and the home directory, files are loaded as a ruby script at the initializing timing.
|
288
288
|
|
@@ -290,7 +290,7 @@ If there are `.rdbgrc.rb` files at the current directory and the home directory,
|
|
290
290
|
|
291
291
|
You can control debuggee's behavior with environment variables:
|
292
292
|
|
293
|
-
* `RUBY_DEBUG_NONSTOP`: 1 for nonstop at the
|
293
|
+
* `RUBY_DEBUG_NONSTOP`: 1 for nonstop at the beginning of program.
|
294
294
|
* `RUBY_DEBUG_INIT_SCRIPT`: Initial script path loaded at the first stop.
|
295
295
|
* `RUBY_DEBUG_COMMANDS`: Debug commands invoked at the first stop. Commands should be separated by ';;'.
|
296
296
|
* `RUBY_DEBUG_SHOW_SRC_LINES`: Show n lines source code on breakpoint (default: 10 lines).
|
@@ -308,7 +308,7 @@ You can control debuggee's behavior with environment variables:
|
|
308
308
|
* [debug command compare sheet - Google Sheets](https://docs.google.com/spreadsheets/d/1TlmmUDsvwK4sSIyoMv-io52BUUz__R5wpu-ComXlsw0/edit?usp=sharing)
|
309
309
|
|
310
310
|
You can use the following debug commands. Each command should be written in 1 line.
|
311
|
-
The `[...]` notation means this part can be
|
311
|
+
The `[...]` notation means this part can be eliminate. For example, `s[tep]` means `s` or `step` are valid command. `ste` is not valid.
|
312
312
|
The `<...>` notation means the argument.
|
313
313
|
|
314
314
|
<%= DEBUGGER__.help %>
|
@@ -322,4 +322,3 @@ The `<...>` notation means the argument.
|
|
322
322
|
# Contributing
|
323
323
|
|
324
324
|
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/debug.
|
325
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koichi Sasada
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Debugging functionality for Ruby. This is completely rewritten debug.rb
|
14
14
|
which was contained by the encient Ruby versions.
|