Always breaks in ruby_executable_hooks.rb file
kushalbhola opened this issue · 2 comments
It always breaks in the ruby_executable_hooks.rb file first. After hitting continue it works fine. I am using below configuration. I cannot find any option to suppress this behavior. Is this a bug or is there any work around this, its quite a frustration
"configurations": [
{
"type": "rdbg",
"name": "Debug current file with rdbg",
"request": "launch",
"script": "${file}",
"args": [],
"askParameters": true
},
{
"type": "rdbg",
"name": "Attach rdbg",
"request": "attach"
}
]
Could you give me a step-by-step repro scenario?
i meet this too.
as for me, using rvm with ruby-2.7.2, and with Gemfile
gem 'cocoapods','1.10.1'
then run
bundle config set --local path '.bundle'
bundle install
debug_cach.rb
require 'cocoapods'
require "pathname"
project_cache_result = Pathname.new("Pods/.project_cache/resolve_cache_result.03f1409de11b2c2625c308b965d59dcde1bdf22b")
cache_result = File.read(project_cache_result)
puts cache_result
launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "rdbg",
"name": "Debug current file with rdbg",
"request": "launch",
"script": "${file}",
"args": [],
"askParameters": false,
"useBundler": true
}
]
}
then start debug debug_cach.rb
always stop at .bundle/ruby/2.7.0/bin/ruby_executable_hooks
#!/usr/bin/env ruby
title = "ruby #{ARGV*" "}"
$0 = ARGV.shift
Process.setproctitle(title) if Process.methods.include?(:setproctitle)
require 'rubygems'
begin
require 'executable-hooks/hooks'
Gem::ExecutableHooks.run($0)
rescue LoadError
warn "unable to load executable-hooks/hooks" if ENV.key?('ExecutableHooks_DEBUG')
end unless $0.end_with?('/executable-hooks-uninstaller')
content = File.read($0)
if (index = content.index("\n#!ruby\n")) && index > 0
skipped_content = content.slice!(0..index)
start_line = skipped_content.count("\n") + 1
eval content, binding, $0, start_line
else
eval content, binding, $0
end