debug 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +1 -1
- data/README.md +2 -2
- data/exe/rdbg +16 -1
- data/lib/debug/client.rb +1 -1
- data/lib/debug/server_cdp.rb +1 -1
- data/lib/debug/server_dap.rb +1 -1
- data/lib/debug/session.rb +6 -4
- data/lib/debug/thread_client.rb +1 -1
- data/lib/debug/version.rb +1 -1
- data/misc/README.md.erb +2 -2
- 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: 61c14c6e761a2ed0f10294682cb7b152c4329d3cd0eccbffff68e3ae122d00a0
|
4
|
+
data.tar.gz: 714add08d21df0ceb674a8a9c8b8599f0dcc45cb38b68611c766fab1b6ddcd41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c43d785c88ce38a676941b87ab320d126d9083f8b4dcc487ef22b8f7f0c4a144ed2fe9dfc800f8d7b2bf9287694c3d5abcd3b7c5075248b5ca08bd6bd0b3bcf
|
7
|
+
data.tar.gz: 8f2e9922aac4e297c437f3fc63ec11df2af430c2f3b3406df8723d4703fc254705246300fee99fee6f38f1da62348184b3ff0dcb6a4ddf302c3345f8ae5d4634
|
data/CONTRIBUTING.md
CHANGED
@@ -269,7 +269,7 @@ Currently, there are 2 kinds of test frameworks for DAP and CDP.
|
|
269
269
|
|
270
270
|
If you want to write protocol-based tests, you should use the test generator.
|
271
271
|
To run the test generator, you can enter `$ bin/gentest target.rb --open=vscode` in the terminal, VSCode will be executed.
|
272
|
-
Also, if you enter
|
272
|
+
Also, if you enter `$ bin/gentest target.rb --open=chrome` there, Chrome will be executed.
|
273
273
|
If you need to modify existing tests, it is basically a good idea to regenerate them by the test generator instead of rewriting them directly.
|
274
274
|
Please refer to [the Microsoft "Debug Adapter Protocol" article](https://microsoft.github.io/debug-adapter-protocol/specification) to learn more about DAP formats.
|
275
275
|
Please refer to [Procol viewer for "Chrome DevTools Protocol"](https://chromedevtools.github.io/devtools-protocol/) to learn more about CDP formats.
|
data/README.md
CHANGED
@@ -438,12 +438,12 @@ $ rdbg target.rb --open=chrome
|
|
438
438
|
DEBUGGER: Debugger can attach via TCP/IP (127.0.0.1:43633)
|
439
439
|
DEBUGGER: With Chrome browser, type the following URL in the address-bar:
|
440
440
|
|
441
|
-
devtools://devtools/bundled/inspector.html?ws=127.0.0.1:
|
441
|
+
devtools://devtools/bundled/inspector.html?v8only=true&panel=sources&ws=127.0.0.1:57231/b32a55cd-2eb5-4c5c-87d8-b3dfc59d80ef
|
442
442
|
|
443
443
|
DEBUGGER: wait for debugger connection...
|
444
444
|
```
|
445
445
|
|
446
|
-
Type `devtools://devtools/bundled/inspector.html?ws=127.0.0.1:
|
446
|
+
Type `devtools://devtools/bundled/inspector.html?v8only=true&panel=sources&ws=127.0.0.1:57231/b32a55cd-2eb5-4c5c-87d8-b3dfc59d80ef` in the address-bar on Chrome browser, and you can continue the debugging with chrome browser.
|
447
447
|
|
448
448
|
Also `open chrome` command works like `open vscode`.
|
449
449
|
|
data/exe/rdbg
CHANGED
@@ -13,9 +13,24 @@ when :start
|
|
13
13
|
start_mode = config[:remote] ? "open" : 'start'
|
14
14
|
cmd = config[:command] ? ARGV.shift : (ENV['RUBY'] || RbConfig.ruby)
|
15
15
|
|
16
|
+
if defined?($:.resolve_feature_path)
|
17
|
+
begin
|
18
|
+
_, sopath = $:.resolve_feature_path('debug/debug.so')
|
19
|
+
rescue LoadError
|
20
|
+
# raises LoadError before 3.1 (2.7 and 3.0)
|
21
|
+
else
|
22
|
+
sopath = File.dirname(File.dirname(sopath)) if sopath
|
23
|
+
end
|
24
|
+
else
|
25
|
+
# `$:.resolve_feature_path` is not defined in 2.6 or earlier.
|
26
|
+
so = "debug/debug.#{RbConfig::CONFIG['DLEXT']}"
|
27
|
+
sopath = $:.find {|dir| File.exist?(File.join(dir, so))}
|
28
|
+
end
|
29
|
+
added = "-r #{libpath}/#{start_mode}"
|
30
|
+
added = "-I #{sopath} #{added}" if sopath
|
16
31
|
rubyopt = ENV['RUBYOPT']
|
17
32
|
env = ::DEBUGGER__::Config.config_to_env_hash(config)
|
18
|
-
env['RUBY_DEBUG_ADDED_RUBYOPT'] = added
|
33
|
+
env['RUBY_DEBUG_ADDED_RUBYOPT'] = added
|
19
34
|
env['RUBYOPT'] = "#{rubyopt} #{added}"
|
20
35
|
|
21
36
|
exec(env, cmd, *ARGV)
|
data/lib/debug/client.rb
CHANGED
data/lib/debug/server_cdp.rb
CHANGED
@@ -998,7 +998,7 @@ module DEBUGGER__
|
|
998
998
|
|
999
999
|
def search_const b, expr
|
1000
1000
|
cs = expr.delete_prefix('::').split('::')
|
1001
|
-
[Object, *b.eval('Module.nesting')].reverse_each{|mod|
|
1001
|
+
[Object, *b.eval('::Module.nesting')].reverse_each{|mod|
|
1002
1002
|
if cs.all?{|c|
|
1003
1003
|
if mod.const_defined?(c)
|
1004
1004
|
mod = mod.const_get(c)
|
data/lib/debug/server_dap.rb
CHANGED
@@ -911,7 +911,7 @@ module DEBUGGER__
|
|
911
911
|
|
912
912
|
def search_const b, expr
|
913
913
|
cs = expr.delete_prefix('::').split('::')
|
914
|
-
[Object, *b.eval('Module.nesting')].reverse_each{|mod|
|
914
|
+
[Object, *b.eval('::Module.nesting')].reverse_each{|mod|
|
915
915
|
if cs.all?{|c|
|
916
916
|
if mod.const_defined?(c)
|
917
917
|
mod = mod.const_get(c)
|
data/lib/debug/session.rb
CHANGED
@@ -1893,9 +1893,11 @@ module DEBUGGER__
|
|
1893
1893
|
|
1894
1894
|
def after_fork child: true
|
1895
1895
|
if child || !@lock_file
|
1896
|
-
@m = Mutex.new
|
1897
|
-
@
|
1898
|
-
|
1896
|
+
@m = Mutex.new unless @m
|
1897
|
+
@m.synchronize do
|
1898
|
+
@lock_level = 0
|
1899
|
+
@lock_file = open(@lock_tempfile.path, 'w')
|
1900
|
+
end
|
1899
1901
|
end
|
1900
1902
|
end
|
1901
1903
|
|
@@ -2229,7 +2231,7 @@ module DEBUGGER__
|
|
2229
2231
|
# depend on the file system. So this check is only roughly estimation.
|
2230
2232
|
|
2231
2233
|
def self.compare_path(a, b)
|
2232
|
-
a
|
2234
|
+
a&.downcase == b&.downcase
|
2233
2235
|
end
|
2234
2236
|
else
|
2235
2237
|
def self.compare_path(a, b)
|
data/lib/debug/thread_client.rb
CHANGED
@@ -568,7 +568,7 @@ module DEBUGGER__
|
|
568
568
|
unless only_self
|
569
569
|
s.ancestors.each{|c| break if c == Object; cs[c] = :ancestors}
|
570
570
|
if b = current_frame&.binding
|
571
|
-
b.eval('Module.nesting').each{|c| cs[c] = :nesting unless cs.has_key? c}
|
571
|
+
b.eval('::Module.nesting').each{|c| cs[c] = :nesting unless cs.has_key? c}
|
572
572
|
end
|
573
573
|
end
|
574
574
|
|
data/lib/debug/version.rb
CHANGED
data/misc/README.md.erb
CHANGED
@@ -438,12 +438,12 @@ $ rdbg target.rb --open=chrome
|
|
438
438
|
DEBUGGER: Debugger can attach via TCP/IP (127.0.0.1:43633)
|
439
439
|
DEBUGGER: With Chrome browser, type the following URL in the address-bar:
|
440
440
|
|
441
|
-
devtools://devtools/bundled/inspector.html?ws=127.0.0.1:
|
441
|
+
devtools://devtools/bundled/inspector.html?v8only=true&panel=sources&ws=127.0.0.1:57231/b32a55cd-2eb5-4c5c-87d8-b3dfc59d80ef
|
442
442
|
|
443
443
|
DEBUGGER: wait for debugger connection...
|
444
444
|
```
|
445
445
|
|
446
|
-
Type `devtools://devtools/bundled/inspector.html?ws=127.0.0.1:
|
446
|
+
Type `devtools://devtools/bundled/inspector.html?v8only=true&panel=sources&ws=127.0.0.1:57231/b32a55cd-2eb5-4c5c-87d8-b3dfc59d80ef` in the address-bar on Chrome browser, and you can continue the debugging with chrome browser.
|
447
447
|
|
448
448
|
Also `open chrome` command works like `open vscode`.
|
449
449
|
|
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.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koichi Sasada
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: irb
|