ruby-debug-ide 0.7.1.beta1 → 0.7.3
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/Rakefile +51 -0
- data/bin/rdebug-ide +5 -1
- data/ext/mkrf_conf.rb +3 -8
- data/lib/ruby-debug-ide/commands/condition.rb +1 -1
- data/lib/ruby-debug-ide/greeter.rb +4 -2
- data/lib/ruby-debug-ide/thread_alias.rb +3 -3
- data/lib/ruby-debug-ide/version.rb +1 -1
- data/lib/ruby-debug-ide/xml_printer.rb +8 -3
- data/lib/ruby-debug-ide.rb +48 -15
- data/ruby-debug-ide.gemspec +2 -3
- metadata +8 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd68f6b14a9e6741f50453d3a0495ca8e4bc1b3079ba745ccd73909bbceed884
|
4
|
+
data.tar.gz: c92c8fc774c5d9706e4c769e54de0a3402dff9859ebbf8b8f4dd0b51adeeff36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eea8a0e35f9e2ac5f26d26e64627a9d9291e44d2e42bacd44af2700d73e7de2ca972fa255363c4bd6a7bba9177a458ac8c937240f1899c02ff504a088116edf
|
7
|
+
data.tar.gz: a7bc78d51b9f1ebafdbf19de69b31644b165ccc315e23644204b87dfeacb4eaaec2e6e0a8ce9140141a08c8f24b80fc775db5d0e9a0069eb4eacd6dfd417e299
|
data/Rakefile
CHANGED
@@ -39,4 +39,55 @@ task :changelog, :since_c, :until_c do |t,args|
|
|
39
39
|
end
|
40
40
|
|
41
41
|
puts changelog_content
|
42
|
+
end
|
43
|
+
|
44
|
+
desc "Generates travis.yaml"
|
45
|
+
task :gen_travis do
|
46
|
+
versions = []
|
47
|
+
|
48
|
+
def versions.add(major:, minor:, include_macos: true)
|
49
|
+
self << { major: major, minor: [minor], include_macos: include_macos }
|
50
|
+
end
|
51
|
+
|
52
|
+
versions.add major: '3.0', minor: 1
|
53
|
+
versions.add major: '2.7', minor: 3
|
54
|
+
versions.add major: '2.6', minor: 7
|
55
|
+
versions.add major: '2.5', minor: 9
|
56
|
+
versions.add major: '2.4', minor: 10
|
57
|
+
versions.add major: '2.3', minor: 8, include_macos: false
|
58
|
+
versions.add major: '2.2', minor: 10, include_macos: false
|
59
|
+
versions.add major: '2.1', minor: 10, include_macos: false
|
60
|
+
versions.add major: '2.0', minor: 0, include_macos: false
|
61
|
+
versions.add major: '1.9', minor: 3, include_macos: false
|
62
|
+
versions.add major: '1.8', minor: 7, include_macos: false
|
63
|
+
|
64
|
+
puts <<EOM
|
65
|
+
language: ruby
|
66
|
+
dist: trusty
|
67
|
+
matrix:
|
68
|
+
fast_finish: true
|
69
|
+
include:
|
70
|
+
EOM
|
71
|
+
|
72
|
+
loop do
|
73
|
+
found_some = false
|
74
|
+
|
75
|
+
versions.each do |version|
|
76
|
+
minor = version[:minor].pop
|
77
|
+
if minor
|
78
|
+
found_some = true
|
79
|
+
full_version = "#{version[:major]}.#{minor}"
|
80
|
+
puts <<EOM
|
81
|
+
- os: linux
|
82
|
+
rvm: #{full_version}
|
83
|
+
EOM
|
84
|
+
puts <<EOM if version[:include_macos]
|
85
|
+
- os: osx
|
86
|
+
rvm: #{full_version}
|
87
|
+
EOM
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
break unless found_some
|
92
|
+
end
|
42
93
|
end
|
data/bin/rdebug-ide
CHANGED
@@ -29,7 +29,8 @@ options = OpenStruct.new(
|
|
29
29
|
'value_as_nested_element' => false,
|
30
30
|
'attach_mode' => false,
|
31
31
|
'cli_debug' => false,
|
32
|
-
'key_value_mode' => false
|
32
|
+
'key_value_mode' => false,
|
33
|
+
'socket_path' => nil
|
33
34
|
)
|
34
35
|
|
35
36
|
opts = OptionParser.new do |opts|
|
@@ -100,6 +101,9 @@ EOB
|
|
100
101
|
opts.on("--value-as-nested-element", "Allow to pass variable's value as nested element instead of attribute") do
|
101
102
|
options.value_as_nested_element = true
|
102
103
|
end
|
104
|
+
opts.on("--socket-path PATH", "Listen for debugger on the given UNIX domain socket path") do |path|
|
105
|
+
options.socket_path = path
|
106
|
+
end
|
103
107
|
opts.separator ""
|
104
108
|
opts.separator "Common options:"
|
105
109
|
opts.on_tail("-v", "--version", "Show version") do
|
data/ext/mkrf_conf.rb
CHANGED
@@ -2,11 +2,6 @@ install_dir = File.expand_path("../../../..", __FILE__)
|
|
2
2
|
jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
3
3
|
rbx = defined?(RUBY_ENGINE) && 'rbx' == RUBY_ENGINE
|
4
4
|
|
5
|
-
def already_installed(dep)
|
6
|
-
!Gem::DependencyInstaller.new(:domain => :local).find_gems_with_sources(dep).empty? ||
|
7
|
-
!Gem::DependencyInstaller.new(:domain => :local,:prerelease => true).find_gems_with_sources(dep).empty?
|
8
|
-
end
|
9
|
-
|
10
5
|
unless jruby || rbx
|
11
6
|
require 'rubygems'
|
12
7
|
require 'rubygems/command.rb'
|
@@ -15,14 +10,14 @@ unless jruby || rbx
|
|
15
10
|
|
16
11
|
begin
|
17
12
|
Gem::Command.build_args = ARGV
|
18
|
-
|
13
|
+
rescue NoMethodError
|
19
14
|
end
|
20
15
|
|
21
16
|
if RUBY_VERSION < "1.9"
|
22
17
|
dep = Gem::Dependency.new("ruby-debug-base", '>=0.10.4')
|
23
18
|
elsif RUBY_VERSION < '2.0'
|
24
19
|
dep = Gem::Dependency.new("ruby-debug-base19x", '>=0.11.30.pre15')
|
25
|
-
else
|
20
|
+
else
|
26
21
|
dep = Gem::Dependency.new("debase", '> 0')
|
27
22
|
end
|
28
23
|
|
@@ -39,7 +34,7 @@ unless jruby || rbx
|
|
39
34
|
puts e.backtrace.join "\n "
|
40
35
|
exit(1)
|
41
36
|
end
|
42
|
-
end unless dep.nil? ||
|
37
|
+
end unless dep.nil? || dep.matching_specs.any?
|
43
38
|
end
|
44
39
|
|
45
40
|
# create dummy rakefile to indicate success
|
@@ -10,7 +10,7 @@ require 'ruby-debug-ide/ide_processor'
|
|
10
10
|
module Debugger
|
11
11
|
|
12
12
|
class << self
|
13
|
-
def print_greeting_msg(stream, host, port, debugger_name = "Fast")
|
13
|
+
def print_greeting_msg(stream, host, port, debugger_name = "Fast", socket_path = nil)
|
14
14
|
base_gem_name = if defined?(JRUBY_VERSION) || RUBY_VERSION < '1.9.0'
|
15
15
|
'ruby-debug-base'
|
16
16
|
elsif RUBY_VERSION < '2.0.0'
|
@@ -27,6 +27,8 @@ module Debugger
|
|
27
27
|
|
28
28
|
if host && port
|
29
29
|
listens_on = " listens on #{host}:#{port}\n"
|
30
|
+
elsif socket_path
|
31
|
+
listens_on = " listens on #{socket_path}\n"
|
30
32
|
else
|
31
33
|
listens_on = "\n"
|
32
34
|
end
|
@@ -37,4 +39,4 @@ module Debugger
|
|
37
39
|
end
|
38
40
|
end
|
39
41
|
|
40
|
-
end
|
42
|
+
end
|
@@ -8,7 +8,7 @@ module Debugger
|
|
8
8
|
end
|
9
9
|
|
10
10
|
Object.const_set :OldThread, ::Thread
|
11
|
-
Object.
|
11
|
+
Object.__send__ :remove_const, :Thread
|
12
12
|
Object.const_set :Thread, ::Debugger::DebugThread
|
13
13
|
end
|
14
14
|
|
@@ -18,9 +18,9 @@ module Debugger
|
|
18
18
|
return
|
19
19
|
end
|
20
20
|
|
21
|
-
Object.
|
21
|
+
Object.__send__ :remove_const, :Thread
|
22
22
|
Object.const_set :Thread, ::OldThread
|
23
|
-
Object.
|
23
|
+
Object.__send__ :remove_const, :OldThread
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -161,6 +161,11 @@ module Debugger
|
|
161
161
|
else
|
162
162
|
name = exec_with_allocation_control(k, :to_s, OverflowMessageType::EXCEPTION_MESSAGE)
|
163
163
|
end
|
164
|
+
|
165
|
+
if k.nil?
|
166
|
+
name = 'nil'
|
167
|
+
end
|
168
|
+
|
164
169
|
print_variable(name, v, 'instance')
|
165
170
|
}
|
166
171
|
end
|
@@ -203,13 +208,13 @@ module Debugger
|
|
203
208
|
end
|
204
209
|
|
205
210
|
def exec_with_allocation_control(value, exec_method, overflow_message_type)
|
206
|
-
return value.
|
211
|
+
return value.__send__ exec_method unless Debugger.trace_to_s
|
207
212
|
|
208
213
|
memory_limit = Debugger.debugger_memory_limit
|
209
214
|
time_limit = Debugger.inspect_time_limit
|
210
215
|
|
211
216
|
if defined?(JRUBY_VERSION) || RUBY_VERSION < '2.0' || memory_limit <= 0
|
212
|
-
return exec_with_timeout(time_limit * 1e-3, "Timeout: evaluation of #{exec_method} took longer than #{time_limit}ms.") { value.
|
217
|
+
return exec_with_timeout(time_limit * 1e-3, "Timeout: evaluation of #{exec_method} took longer than #{time_limit}ms.") { value.__send__ exec_method }
|
213
218
|
end
|
214
219
|
|
215
220
|
require 'objspace'
|
@@ -240,7 +245,7 @@ module Debugger
|
|
240
245
|
end
|
241
246
|
end
|
242
247
|
trace_point.enable
|
243
|
-
result = value.
|
248
|
+
result = value.__send__ exec_method
|
244
249
|
trace_queue << result
|
245
250
|
trace_point.disable
|
246
251
|
end
|
data/lib/ruby-debug-ide.rb
CHANGED
@@ -74,16 +74,22 @@ module Debugger
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def start_server(host = nil, port = 1234, notify_dispatcher = false)
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
_start_server_common(host, port, nil, notify_dispatcher)
|
78
|
+
end
|
79
|
+
|
80
|
+
def start_server_unix(socket_path, notify_dispatcher = false)
|
81
|
+
_start_server_common(nil, 0, socket_path, notify_dispatcher)
|
80
82
|
end
|
81
83
|
|
82
84
|
def prepare_debugger(options)
|
83
85
|
@mutex = Mutex.new
|
84
86
|
@proceed = ConditionVariable.new
|
85
87
|
|
86
|
-
|
88
|
+
if options.socket_path.nil?
|
89
|
+
start_server(options.host, options.port, options.notify_dispatcher)
|
90
|
+
else
|
91
|
+
start_server_unix(options.socket_path, options.notify_dispatcher)
|
92
|
+
end
|
87
93
|
|
88
94
|
raise "Control thread did not start (#{@control_thread}}" unless @control_thread && @control_thread.alive?
|
89
95
|
|
@@ -112,24 +118,53 @@ module Debugger
|
|
112
118
|
end
|
113
119
|
|
114
120
|
def start_control(host, port, notify_dispatcher)
|
121
|
+
_start_control_common(host, port, nil, notify_dispatcher)
|
122
|
+
end
|
123
|
+
|
124
|
+
def start_control_unix(socket_path, notify_dispatcher)
|
125
|
+
_start_control_common(nil, 0, socket_path, notify_dispatcher)
|
126
|
+
end
|
127
|
+
|
128
|
+
private
|
129
|
+
|
130
|
+
def _start_server_common(host, port, socket_path, notify_dispatcher)
|
131
|
+
return if started?
|
132
|
+
start
|
133
|
+
_start_control_common(host, port, socket_path, notify_dispatcher)
|
134
|
+
end
|
135
|
+
|
136
|
+
def _start_control_common(host, port, socket_path, notify_dispatcher)
|
115
137
|
raise "Debugger is not started" unless started?
|
116
138
|
return if @control_thread
|
117
139
|
@control_thread = DebugThread.new do
|
118
140
|
begin
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
141
|
+
if socket_path.nil?
|
142
|
+
# 127.0.0.1 seemingly works with all systems and with IPv6 as well.
|
143
|
+
# "localhost" and nil have problems on some systems.
|
144
|
+
host ||= '127.0.0.1'
|
145
|
+
|
146
|
+
server = notify_dispatcher_if_needed(host, port, notify_dispatcher) do |real_port, port_changed|
|
147
|
+
s = TCPServer.new(host, real_port)
|
148
|
+
print_greeting_msg $stderr, host, real_port, port_changed ? "Subprocess" : "Fast" if defined? IDE_VERSION
|
149
|
+
s
|
150
|
+
end
|
151
|
+
else
|
152
|
+
raise "Cannot specify host and socket_file at the same time" if host
|
153
|
+
File.delete(socket_path) if File.exist?(socket_path)
|
154
|
+
server = UNIXServer.new(socket_path)
|
155
|
+
print_greeting_msg $stderr, nil, nil, "Fast", socket_path if defined? IDE_VERSION
|
127
156
|
end
|
128
157
|
|
129
158
|
return unless server
|
130
159
|
|
131
160
|
while (session = server.accept)
|
132
|
-
|
161
|
+
if Debugger.cli_debug
|
162
|
+
if session.peeraddr == 'AF_INET'
|
163
|
+
$stderr.puts "Connected from #{session.peeraddr[2]}"
|
164
|
+
else
|
165
|
+
$stderr.puts "Connected from local client"
|
166
|
+
end
|
167
|
+
end
|
133
168
|
dispatcher = ENV['IDE_PROCESS_DISPATCHER']
|
134
169
|
if dispatcher
|
135
170
|
ENV['IDE_PROCESS_DISPATCHER'] = "#{session.peeraddr[2]}:#{dispatcher}" unless dispatcher.include?(":")
|
@@ -153,8 +188,6 @@ module Debugger
|
|
153
188
|
end
|
154
189
|
end
|
155
190
|
|
156
|
-
private
|
157
|
-
|
158
191
|
def notify_dispatcher_if_needed(host, port, need_notify)
|
159
192
|
return yield port unless need_notify
|
160
193
|
|
data/ruby-debug-ide.gemspec
CHANGED
@@ -30,8 +30,8 @@ EOF
|
|
30
30
|
|
31
31
|
spec.version = RUBY_DEBUG_IDE_VERSION
|
32
32
|
|
33
|
-
spec.author = "Markus Barchfeld, Martin Krauskopf, Mark Moseley,
|
34
|
-
spec.email = "
|
33
|
+
spec.author = "Markus Barchfeld, Martin Krauskopf, Mark Moseley, Alexandr Evstigneev"
|
34
|
+
spec.email = "hurricup@gmail.com"
|
35
35
|
spec.license = "MIT"
|
36
36
|
spec.platform = Gem::Platform::RUBY
|
37
37
|
spec.require_path = "lib"
|
@@ -44,5 +44,4 @@ EOF
|
|
44
44
|
|
45
45
|
spec.required_ruby_version = '>= 1.8.2'
|
46
46
|
spec.date = DateTime.now
|
47
|
-
spec.rubyforge_project = 'debug-commons'
|
48
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-debug-ide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Markus Barchfeld, Martin Krauskopf, Mark Moseley,
|
7
|
+
- Markus Barchfeld, Martin Krauskopf, Mark Moseley, Alexandr Evstigneev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -27,8 +27,8 @@ dependencies:
|
|
27
27
|
description: 'An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans
|
28
28
|
and RubyMine.
|
29
29
|
|
30
|
-
'
|
31
|
-
email:
|
30
|
+
'
|
31
|
+
email: hurricup@gmail.com
|
32
32
|
executables:
|
33
33
|
- rdebug-ide
|
34
34
|
- gdb_wrapper
|
@@ -99,12 +99,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
99
|
version: 1.8.2
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - "
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
104
|
+
version: '0'
|
105
105
|
requirements: []
|
106
|
-
|
107
|
-
rubygems_version: 2.7.7
|
106
|
+
rubygems_version: 3.2.22
|
108
107
|
signing_key:
|
109
108
|
specification_version: 4
|
110
109
|
summary: IDE interface for ruby-debug.
|