From e698bf91ee97b2de288eeeb480c9ae418b01903d Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 23 Apr 2022 20:56:29 -0500 Subject: [PATCH] gems: replace pry with debug. Replace the 'pry' gem with the 'debug' gem. The debug gem is the new standard debugger in Ruby 3.1. Use `binding.break` instead of `binding.pry` to set breakpoints. Install the extension below for VS Code support. https://github.com/ruby/debug#how-to-use https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg --- Gemfile | 3 +-- Gemfile.lock | 20 +++++++++----------- bin/{pry => rdbg} | 10 ++++------ 3 files changed, 14 insertions(+), 19 deletions(-) rename bin/{pry => rdbg} (66%) diff --git a/Gemfile b/Gemfile index 60d1729cf..846bf9c9d 100644 --- a/Gemfile +++ b/Gemfile @@ -49,14 +49,13 @@ gem 'puma-metrics' gem 'puma_worker_killer' gem "rack-timeout", require: "rack/timeout/base" gem "parallel" -gem "pry-byebug" -gem "pry-rails" gem "ffi" gem "rbtrace" gem "good_job" gem "crass" gem "public_suffix" gem "elastic-apm" +gem "debug" group :development do gem 'rubocop', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 5edc5b6d4..2bc7ce8a7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -117,7 +117,6 @@ GEM bootsnap (1.11.1) msgpack (~> 1.2) builder (3.2.4) - byebug (11.1.3) capybara (3.36.0) addressable matrix @@ -139,6 +138,9 @@ GEM daemons (1.4.1) dante (0.2.0) dead_end (3.1.1) + debug (1.4.0) + irb (>= 1.3.6) + reline (>= 0.2.7) debug_inspector (1.1.0) declarative (0.0.20) derailed_benchmarks (2.1.1) @@ -254,7 +256,10 @@ GEM httpclient (2.8.3) i18n (1.10.0) concurrent-ruby (~> 1.0) + io-console (0.5.11) ipaddress_2 (0.14.0) + irb (1.4.1) + reline (>= 0.3.0) jaro_winkler (1.5.4) jmespath (1.6.1) json (2.6.1) @@ -327,14 +332,6 @@ GEM ast (~> 2.4.1) pg (1.3.5) prometheus-client (4.0.0) - pry (0.13.1) - coderay (~> 1.1) - method_source (~> 1.0) - pry-byebug (3.9.0) - byebug (~> 11.0) - pry (~> 0.13.0) - pry-rails (0.3.9) - pry (>= 0.10.4) public_suffix (4.0.7) puma (5.6.4) nio4r (~> 2.0) @@ -396,6 +393,8 @@ GEM json redis (4.6.0) regexp_parser (2.3.0) + reline (0.3.0) + io-console (~> 0.5) representable (3.1.1) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) @@ -531,6 +530,7 @@ DEPENDENCIES codecov crass daemons + debug derailed_benchmarks diff-lcs dotenv-rails @@ -560,8 +560,6 @@ DEPENDENCIES oauth2 parallel pg - pry-byebug - pry-rails public_suffix puma puma-metrics diff --git a/bin/pry b/bin/rdbg similarity index 66% rename from bin/pry rename to bin/rdbg index bfcc3d482..06225507d 100755 --- a/bin/pry +++ b/bin/rdbg @@ -4,15 +4,13 @@ # # This file was generated by Bundler. # -# The application 'pry' is installed as part of a gem, and +# The application 'rdbg' is installed as part of a gem, and # this file is here to facilitate running it. # -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) -bundle_binstub = File.expand_path("../bundle", __FILE__) +bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ @@ -26,4 +24,4 @@ end require "rubygems" require "bundler/setup" -load Gem.bin_path("pry", "pry") +load Gem.bin_path("debug", "rdbg")