ruby-debug-ide 0.7.0 → 0.7.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 +5 -5
- data/bin/gdb_wrapper +0 -0
- data/bin/rdebug-ide +7 -1
- data/ext/mkrf_conf.rb +3 -8
- data/lib/ruby-debug-ide.rb +49 -16
- data/lib/ruby-debug-ide/commands/condition.rb +1 -1
- data/lib/ruby-debug-ide/commands/jump.rb +0 -0
- data/lib/ruby-debug-ide/commands/pause.rb +0 -0
- data/lib/ruby-debug-ide/commands/set_type.rb +0 -0
- data/lib/ruby-debug-ide/greeter.rb +4 -2
- data/lib/ruby-debug-ide/version.rb +1 -1
- data/lib/ruby-debug-ide/xml_printer.rb +5 -0
- data/ruby-debug-ide.gemspec +0 -4
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ddd9e5401c5afc093a33c52250939944abab7cf945d57cd2a0efd18389c0adbf
|
4
|
+
data.tar.gz: 78d3ec32359393c66234648a0296988c85a7309ef05348fadc4f64b4e5119e48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d323ac8d10c8a890b7b7fec0444d346886f9ecb0ed500d6b7f498a2175726a41ecb6bb9bb48a1a9e6426f9a09be3dea6d960797fef5a02274ead00562babfb0
|
7
|
+
data.tar.gz: 90d54997a247fa2fc149b6ead69d56f42f61365d84f0eb12026694468aff275f53e64d3ee7bdff49948c0b4c51fac3dafba62e75c39e62165c7b48faa20ed9ae
|
data/bin/gdb_wrapper
CHANGED
File without changes
|
data/bin/rdebug-ide
CHANGED
@@ -17,6 +17,7 @@ options = OpenStruct.new(
|
|
17
17
|
'port' => 1234,
|
18
18
|
'stop' => false,
|
19
19
|
'tracing' => false,
|
20
|
+
'skip_wait_for_start' => false,
|
20
21
|
'int_handler' => true,
|
21
22
|
'dispatcher_port' => -1,
|
22
23
|
'evaluation_timeout' => 10,
|
@@ -28,7 +29,8 @@ options = OpenStruct.new(
|
|
28
29
|
'value_as_nested_element' => false,
|
29
30
|
'attach_mode' => false,
|
30
31
|
'cli_debug' => false,
|
31
|
-
'key_value_mode' => false
|
32
|
+
'key_value_mode' => false,
|
33
|
+
'socket_path' => nil
|
32
34
|
)
|
33
35
|
|
34
36
|
opts = OptionParser.new do |opts|
|
@@ -67,6 +69,7 @@ EOB
|
|
67
69
|
|
68
70
|
opts.on('--stop', 'stop when the script is loaded') {options.stop = true}
|
69
71
|
opts.on("-x", "--trace", "turn on line tracing") {options.tracing = true}
|
72
|
+
opts.on("--skip_wait_for_start", "skip wait for 'start' command") {options.skip_wait_for_start = true}
|
70
73
|
opts.on("-l", "--load-mode", "load mode (experimental)") {options.load_mode = true}
|
71
74
|
opts.on("-d", "--debug", "Debug self - prints information for debugging ruby-debug itself") do
|
72
75
|
Debugger.cli_debug = true
|
@@ -98,6 +101,9 @@ EOB
|
|
98
101
|
opts.on("--value-as-nested-element", "Allow to pass variable's value as nested element instead of attribute") do
|
99
102
|
options.value_as_nested_element = true
|
100
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
|
101
107
|
opts.separator ""
|
102
108
|
opts.separator "Common options:"
|
103
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
|
data/lib/ruby-debug-ide.rb
CHANGED
@@ -74,23 +74,29 @@ 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
|
|
90
96
|
# wait for 'start' command
|
91
97
|
@mutex.synchronize do
|
92
98
|
@proceed.wait(@mutex)
|
93
|
-
end
|
99
|
+
end unless options.skip_wait_for_start
|
94
100
|
end
|
95
101
|
|
96
102
|
def debug_program(options)
|
@@ -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
|
|
File without changes
|
File without changes
|
File without changes
|
@@ -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
|
data/ruby-debug-ide.gemspec
CHANGED
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains RubyMine Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
description: 'An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans
|
28
28
|
and RubyMine.
|
29
29
|
|
30
|
-
'
|
30
|
+
'
|
31
31
|
email: rubymine-feedback@jetbrains.com
|
32
32
|
executables:
|
33
33
|
- rdebug-ide
|
@@ -103,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
|
107
|
-
rubygems_version: 2.6.10
|
106
|
+
rubygems_version: 3.0.3
|
108
107
|
signing_key:
|
109
108
|
specification_version: 4
|
110
109
|
summary: IDE interface for ruby-debug.
|