debug 1.3.4 → 1.4.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.
data/lib/debug/tracer.rb CHANGED
@@ -142,7 +142,7 @@ module DEBUGGER__
142
142
  out tp, ">#{sp}#{call_identifier_str}", depth
143
143
  when :return, :c_return, :b_return
144
144
  depth += 1 if tp.event == :c_return
145
- return_str = colorize_magenta(DEBUGGER__.short_inspect(tp.return_value))
145
+ return_str = colorize_magenta(DEBUGGER__.safe_inspect(tp.return_value, short: true))
146
146
  out tp, "<#{sp}#{call_identifier_str} #=> #{return_str}", depth
147
147
  end
148
148
  }
data/lib/debug/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DEBUGGER__
4
- VERSION = "1.3.4"
4
+ VERSION = "1.4.0"
5
5
  end
data/misc/README.md.erb CHANGED
@@ -60,8 +60,14 @@ There are several options for (1) and (2). Please choose your favorite way.
60
60
 
61
61
  ### Modify source code with [`binding.break`](#bindingbreak-method) (similar to `binding.pry` or `binding.irb`)
62
62
 
63
- If you can modify the source code, you can use the debugger by adding `require 'debug'` line at the top of your program and putting [`binding.break`](#bindingbreak-method) method (`binding.b` for short) into lines where you want to stop as breakpoints like `binding.pry` and `binding.irb`.
64
- After that, you run the program as usual and you will enter the debug console at breakpoints you inserted.
63
+ If you can modify the source code, you can use the debugger by adding `require 'debug'` at the top of your program and putting [`binding.break`](#bindingbreak-method) method into lines where you want to stop as breakpoints like `binding.pry` and `binding.irb`.
64
+
65
+ You can also use its 2 aliases in the same way:
66
+
67
+ - `binding.b`
68
+ - `debugger`
69
+
70
+ After that, run the program as usual and you will enter the debug console at breakpoints you inserted.
65
71
 
66
72
  The following example shows the demonstration of [`binding.break`](#bindingbreak-method).
67
73
 
@@ -346,7 +352,7 @@ You can attach with external debugger frontend with VSCode and Chrome.
346
352
  $ rdbg --open=[frontend] target.rb
347
353
  ```
348
354
 
349
- will open a debug port and `[frontned]` can attache to the port.
355
+ will open a debug port and `[frontend]` can attach to the port.
350
356
 
351
357
  Also `open` command allows opening the debug port.
352
358
 
@@ -427,7 +433,9 @@ Type `devtools://devtools/bundled/inspector.html?ws=127.0.0.1:43633` in the addr
427
433
 
428
434
  Also `open chrome` command works like `open vscode`.
429
435
 
430
- For more information about how to use Chrome debugging, you might want to read [here](https://developer.chrome.com/docs/devtools/)
436
+ For more information about how to use Chrome debugging, you might want to read [here](https://developer.chrome.com/docs/devtools/).
437
+
438
+ Note: If you want to maximize Chrome DevTools, click [Toggle Device Toolbar](https://developer.chrome.com/docs/devtools/device-mode/#viewport).
431
439
 
432
440
  ## Configuration
433
441
 
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.3.4
4
+ version: 1.4.0
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-10-29 00:00:00.000000000 Z
11
+ date: 2021-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: irb
@@ -51,6 +51,7 @@ files:
51
51
  - ".github/ISSUE_TEMPLATE/bug_report.md"
52
52
  - ".github/ISSUE_TEMPLATE/custom.md"
53
53
  - ".github/ISSUE_TEMPLATE/feature_request.md"
54
+ - ".github/pull_request_template.md"
54
55
  - ".github/workflows/ruby.yml"
55
56
  - ".gitignore"
56
57
  - CONTRIBUTING.md