ruby-debug-ide 0.6.1.beta3 → 0.6.1.beta4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 425519e48f44723b8129340ee99f2a2741aaa07c
4
- data.tar.gz: 99cd5ba804e4884644ac5d38465a8ab1f73cd40f
3
+ metadata.gz: 90ec6589dc3043b457fe0c148595388e8052df55
4
+ data.tar.gz: b60add310e51a12ed117d28b2710a816aab51575
5
5
  SHA512:
6
- metadata.gz: c2a4de25b4516fc011791b0d6572e57f52d06335b03b1225deb5c771bbd6cf25db7d954424f916e099f4f961719f933855e875be11f04f14a34454cdf8d638c7
7
- data.tar.gz: 5836a80d9904b1b08b87f33b77f2806a1a3bbdc57b4a2697766bbd6c7f2ffda888fe5d2c2573b49b48cab849208a7aba699f03bdb6e97e6d2807187283ce25d0
6
+ metadata.gz: 19c91299d491b609b74cd72e3ea4d909d5f09322bd015fa3c3451aedb019e3d7e0321c3de08cc283019e408d4612ba3cec1326f0b52890f8e1fe0aa6f520e2db
7
+ data.tar.gz: b33c0c1e0ac56f69330832dfbc1631dc8dff03c886d33be8127f9352620225c7245cc9af110bfb72997294ae99efb2addac507519f4ddf01bd7810b3b9b93312
@@ -117,6 +117,7 @@ if options.dispatcher_port != -1
117
117
  else
118
118
  require_relative '../lib/ruby-debug-ide/multiprocess'
119
119
  end
120
+ Debugger::MultiProcess.do_monkey
120
121
 
121
122
  ENV['DEBUGGER_STORED_RUBYLIB'] = ENV['RUBYLIB']
122
123
  old_opts = ENV['RUBYOPT'] || ''
@@ -140,8 +141,6 @@ Debugger.evaluation_timeout = options.evaluation_timeout
140
141
  Debugger.catchpoint_deleted_event = options.catchpoint_deleted_event || options.rm_protocol_extensions
141
142
  Debugger.value_as_nested_element = options.value_as_nested_element || options.rm_protocol_extensions
142
143
 
143
- Debugger.attached = true
144
-
145
144
  if options.attach_mode
146
145
  if Debugger::FRONT_END == "debase"
147
146
  Debugger.init_variables
@@ -136,9 +136,9 @@ module Debugger
136
136
  end
137
137
 
138
138
  def execute
139
- Debugger.attached = false
140
139
  Debugger.stop
141
140
  Debugger.interface.close
141
+ Debugger::MultiProcess.undo_monkey
142
142
  Debugger.control_thread = nil
143
143
  Thread.current.exit #@control_thread is a current thread
144
144
  end
@@ -1,7 +1,23 @@
1
- if RUBY_VERSION < "1.9"
1
+ if RUBY_VERSION < '1.9'
2
2
  require 'ruby-debug-ide/multiprocess/pre_child'
3
- require 'ruby-debug-ide/multiprocess/monkey'
4
3
  else
5
4
  require_relative 'multiprocess/pre_child'
6
- require_relative 'multiprocess/monkey'
5
+ end
6
+
7
+ module Debugger
8
+ module MultiProcess
9
+ class << self
10
+ def do_monkey
11
+ load File.expand_path(File.dirname(__FILE__) + '/multiprocess/monkey.rb')
12
+ end
13
+
14
+ def undo_monkey
15
+ if ENV['IDE_PROCESS_DISPATCHER']
16
+ load File.expand_path(File.dirname(__FILE__) + '/multiprocess/unmonkey.rb')
17
+ ruby_opts = ENV['RUBYOPT'].split(' ')
18
+ ENV['RUBYOPT'] = ruby_opts.keep_if {|opt| !opt.end_with?('ruby-debug-ide/multiprocess/starter')}.join(' ')
19
+ end
20
+ end
21
+ end
22
+ end
7
23
  end
@@ -2,8 +2,6 @@ module Debugger
2
2
  module MultiProcess
3
3
  class << self
4
4
  def pre_child(options = nil)
5
- return unless Debugger.attached
6
-
7
5
  require 'socket'
8
6
  require 'ostruct'
9
7
 
@@ -0,0 +1,31 @@
1
+ module Debugger
2
+ module MultiProcess
3
+ def self.restore_fork
4
+ %Q{
5
+ alias fork pre_debugger_fork
6
+ }
7
+ end
8
+
9
+ def self.restore_exec
10
+ %Q{
11
+ alias exec pre_debugger_exec
12
+ }
13
+ end
14
+ end
15
+ end
16
+
17
+ module Kernel
18
+ class << self
19
+ module_eval Debugger::MultiProcess.restore_fork
20
+ module_eval Debugger::MultiProcess.restore_exec
21
+ end
22
+ module_eval Debugger::MultiProcess.restore_fork
23
+ module_eval Debugger::MultiProcess.restore_exec
24
+ end
25
+
26
+ module Process
27
+ class << self
28
+ module_eval Debugger::MultiProcess.restore_fork
29
+ module_eval Debugger::MultiProcess.restore_exec
30
+ end
31
+ end
@@ -1,3 +1,3 @@
1
1
  module Debugger
2
- IDE_VERSION='0.6.1.beta3'
2
+ IDE_VERSION='0.6.1.beta4'
3
3
  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.6.1.beta3
4
+ version: 0.6.1.beta4
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: 2016-11-10 00:00:00.000000000 Z
11
+ date: 2016-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -79,6 +79,7 @@ files:
79
79
  - lib/ruby-debug-ide/multiprocess/monkey.rb
80
80
  - lib/ruby-debug-ide/multiprocess/pre_child.rb
81
81
  - lib/ruby-debug-ide/multiprocess/starter.rb
82
+ - lib/ruby-debug-ide/multiprocess/unmonkey.rb
82
83
  - lib/ruby-debug-ide/version.rb
83
84
  - lib/ruby-debug-ide/xml_printer.rb
84
85
  - ruby-debug-ide.gemspec