Skip to content

Commit

Permalink
Remove debugger support
Browse files Browse the repository at this point in the history
debase and ruby-debug-ide don't seem to install reliably on Ruby 3.1 Linux for reasons that are hard to get to the bottom of. Maybe this is better to be added back later, perhaps via ruby/debug

Signed-off-by: Chad Wilson <chadw@thoughtworks.com>
  • Loading branch information
chadlwilson committed Jul 1, 2023
1 parent da04c87 commit 7c7bbae
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
7 changes: 0 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@ PATH
remote: .
specs:
gauge-ruby (0.6.0)
debase (~> 0.2.5.beta2)
grpc (~> 1.10, >= 1.10.0)
parser (>= 2.7, < 4.0)
ruby-debug-ide (>= 0.6, < 0.8)
ruby-protocol-buffers (= 1.6.1)
unparser (>= 0.5.0, < 0.7.0)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
debase (0.2.5.beta2)
debase-ruby_core_source (>= 0.10.12)
debase-ruby_core_source (3.2.1)
diff-lcs (1.5.0)
docile (1.4.0)
google-protobuf (3.23.3)
Expand Down Expand Up @@ -55,8 +50,6 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
ruby-debug-ide (0.7.3)
rake (>= 0.8.1)
ruby-protocol-buffers (1.6.1)
rubyzip (2.3.2)
simplecov (0.22.0)
Expand Down
2 changes: 0 additions & 2 deletions gauge-ruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'ruby-protocol-buffers', '1.6.1'
s.add_runtime_dependency 'parser', '>= 2.7', '< 4.0'
s.add_runtime_dependency 'unparser', '>= 0.5.0', '< 0.7.0'
s.add_runtime_dependency 'ruby-debug-ide', '>=0.6', '<0.8'
s.add_runtime_dependency 'debase', '~>0.2.5.beta2'
s.add_runtime_dependency 'grpc', '~> 1.10', '>= 1.10.0'
s.add_development_dependency 'grpc-tools', '~> 1.10', '>= 1.10.0'
s.required_ruby_version = ">= 2.7" if s.respond_to? :required_ruby_version=
Expand Down
18 changes: 1 addition & 17 deletions lib/executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
* Licensed under the Apache License, Version 2.0
* See LICENSE.txt in the project root for license information.
=end
require 'ruby-debug-ide'
require_relative 'gauge'

ATTACH_DEBUGGER_EVENT = 'Runner Ready for Debugging'

module Gauge
class DebugOptions
attr_accessor :host, :port, :notify_dispatcher, :socket_path, :skip_wait_for_start
Expand All @@ -16,10 +13,9 @@ class DebugOptions
# @api private
module Executor
def self.load_steps(dir)
start_debugger
Dir["#{dir}/**/*.rb"].each do |x|
begin
GaugeLog.debug "Loading step implemetations from #{x} dirs"
GaugeLog.debug "Loading step implementations from #{x} dirs"
ENV['GAUGE_STEP_FILE'] = x
require x
rescue Exception => e
Expand All @@ -28,18 +24,6 @@ def self.load_steps(dir)
end
end

def self.start_debugger
if ENV['DEBUGGING']
options = DebugOptions.new
options.host = '127.0.0.1'
options.port = ENV['DEBUG_PORT'].to_i
options.notify_dispatcher = false
options.skip_wait_for_start = false
GaugeLog.info ATTACH_DEBUGGER_EVENT
Debugger.prepare_debugger(options)
end
end

def self.execute_step(step, args)
si = MethodCache.get_step_info step
if args.size == 1
Expand Down

0 comments on commit 7c7bbae

Please sign in to comment.