debug 1.6.1 → 1.6.2
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.
- checksums.yaml +4 -4
- data/exe/rdbg +2 -2
- data/lib/debug/prelude.rb +1 -0
- data/lib/debug/server_dap.rb +4 -4
- data/lib/debug/session.rb +14 -7
- data/lib/debug/version.rb +1 -1
- data/lib/debug.rb +1 -0
- 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: 2247fdc7a834d652c93b28303b0a8de444aedfc75952965797f3d7e0f4e5115b
|
4
|
+
data.tar.gz: 6dfd3fd3f3e9a4d8e7469bb8dea86a056fc92d249353809be35691828142dbf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c1defaf4f8ff5d90a7becbbcf839953f61669672eefcbe82fb14d5a11e8706fe8fe8f38a097fecc07cdc57576b2e9c30cffce24252bd6da700d24bc3495f380
|
7
|
+
data.tar.gz: 620083feac21bbe224eb93d752b181a0a85421ebf1f5ae3e2f35a223737c1ad73e09215357ea231a05fb1c8b2c9157a2ea7eed04377b5103284ec6e60d33d171
|
data/exe/rdbg
CHANGED
@@ -13,10 +13,10 @@ when :start
|
|
13
13
|
start_mode = config[:remote] ? "open" : 'start'
|
14
14
|
cmd = config[:command] ? ARGV.shift : (ENV['RUBY'] || RbConfig.ruby)
|
15
15
|
|
16
|
+
rubyopt = ENV['RUBYOPT']
|
16
17
|
env = ::DEBUGGER__::Config.config_to_env_hash(config)
|
17
|
-
rubyopt = env['RUBYOPT']
|
18
18
|
env['RUBY_DEBUG_ADDED_RUBYOPT'] = added = "-r #{libpath}/#{start_mode}"
|
19
|
-
env['RUBYOPT'] = "#{
|
19
|
+
env['RUBYOPT'] = "#{rubyopt} #{added}"
|
20
20
|
|
21
21
|
exec(env, cmd, *ARGV)
|
22
22
|
|
data/lib/debug/prelude.rb
CHANGED
data/lib/debug/server_dap.rb
CHANGED
@@ -263,7 +263,7 @@ module DEBUGGER__
|
|
263
263
|
|
264
264
|
def process
|
265
265
|
while req = recv_request
|
266
|
-
raise "not a request: #{req.
|
266
|
+
raise "not a request: #{req.inspect}" unless req['type'] == 'request'
|
267
267
|
args = req.dig('arguments')
|
268
268
|
|
269
269
|
case req['command']
|
@@ -348,6 +348,9 @@ module DEBUGGER__
|
|
348
348
|
when 'disconnect'
|
349
349
|
terminate = args.fetch("terminateDebuggee", false)
|
350
350
|
|
351
|
+
SESSION.clear_all_breakpoints
|
352
|
+
send_response req
|
353
|
+
|
351
354
|
if SESSION.in_subsession?
|
352
355
|
if terminate
|
353
356
|
@q_msg << 'kill!'
|
@@ -361,9 +364,6 @@ module DEBUGGER__
|
|
361
364
|
end
|
362
365
|
end
|
363
366
|
|
364
|
-
SESSION.clear_all_breakpoints
|
365
|
-
send_response req
|
366
|
-
|
367
367
|
## control
|
368
368
|
when 'continue'
|
369
369
|
@q_msg << 'c'
|
data/lib/debug/session.rb
CHANGED
@@ -22,8 +22,9 @@ end
|
|
22
22
|
# restore RUBYOPT
|
23
23
|
if (added_opt = ENV['RUBY_DEBUG_ADDED_RUBYOPT']) &&
|
24
24
|
(rubyopt = ENV['RUBYOPT']) &&
|
25
|
-
rubyopt.
|
26
|
-
|
25
|
+
rubyopt.end_with?(added_opt)
|
26
|
+
|
27
|
+
ENV['RUBYOPT'] = rubyopt.delete_suffix(added_opt)
|
27
28
|
ENV['RUBY_DEBUG_ADDED_RUBYOPT'] = nil
|
28
29
|
end
|
29
30
|
|
@@ -212,18 +213,24 @@ module DEBUGGER__
|
|
212
213
|
|
213
214
|
def process_event evt
|
214
215
|
# variable `@internal_info` is only used for test
|
215
|
-
|
216
|
+
tc, output, ev, @internal_info, *ev_args = evt
|
216
217
|
|
217
218
|
output.each{|str| @ui.puts str} if ev != :suspend
|
218
219
|
|
219
|
-
|
220
|
-
|
221
|
-
|
220
|
+
# special event, tc is nil
|
221
|
+
# and we don't want to set @tc to the newly created thread's ThreadClient
|
222
|
+
if ev == :thread_begin
|
222
223
|
th = ev_args.shift
|
223
224
|
q = ev_args.shift
|
224
225
|
on_thread_begin th
|
225
226
|
q << true
|
226
227
|
|
228
|
+
return
|
229
|
+
end
|
230
|
+
|
231
|
+
@tc = tc
|
232
|
+
|
233
|
+
case ev
|
227
234
|
when :init
|
228
235
|
enter_subsession
|
229
236
|
wait_command_loop
|
@@ -2120,7 +2127,7 @@ module DEBUGGER__
|
|
2120
2127
|
end
|
2121
2128
|
|
2122
2129
|
# Inspector
|
2123
|
-
|
2130
|
+
|
2124
2131
|
SHORT_INSPECT_LENGTH = 40
|
2125
2132
|
|
2126
2133
|
class LimitedPP
|
data/lib/debug/version.rb
CHANGED
data/lib/debug.rb
CHANGED
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.2
|
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-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: irb
|