From b42e91bd5f2e1335daeaaf6aa23791506353354f Mon Sep 17 00:00:00 2001 From: pvincent Date: Fri, 16 Jun 2023 22:28:43 +0400 Subject: [PATCH] rails debugger --- .vscode/launch.json | 16 ++++++++++++++++ Gemfile | 5 ++++- Gemfile.lock | 16 +++++++--------- Procfile.dev | 2 +- 4 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..ca04038 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for rdebug-ide", + "type": "Ruby", + "request": "attach", + "remoteHost": "127.0.0.1", + "remotePort": "1234", + "remoteWorkspaceRoot": "${workspaceRoot}" + } + ] +} \ No newline at end of file diff --git a/Gemfile b/Gemfile index 8899515..63237d8 100644 --- a/Gemfile +++ b/Gemfile @@ -59,7 +59,6 @@ gem 'devise' group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem - gem 'debug', platforms: %i[mri mingw x64_mingw] end group :development do @@ -75,6 +74,10 @@ group :development do gem 'rubocop' gem 'rubocop-rails' gem 'solargraph' + + # gem 'debug' + gem 'debase', '>= 0.2.5.beta2' + gem 'ruby-debug-ide' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index dd2fe84..486d2b3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -89,9 +89,9 @@ GEM concurrent-ruby (1.2.2) crass (1.0.6) date (3.3.3) - debug (1.8.0) - irb (>= 1.5.0) - reline (>= 0.3.1) + debase (0.2.5.beta2) + debase-ruby_core_source (>= 0.10.12) + debase-ruby_core_source (3.2.1) devise (4.9.2) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -109,9 +109,6 @@ GEM importmap-rails (1.1.6) actionpack (>= 6.0.0) railties (>= 6.0.0) - io-console (0.6.0) - irb (1.6.4) - reline (>= 0.3.0) jaro_winkler (1.5.6) jbuilder (2.11.5) actionview (>= 5.0.0) @@ -204,8 +201,6 @@ GEM ffi (~> 1.0) rbs (2.8.4) regexp_parser (2.8.0) - reline (0.3.4) - io-console (~> 0.5) responders (3.1.0) actionpack (>= 5.2) railties (>= 5.2) @@ -228,6 +223,8 @@ GEM activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) + ruby-debug-ide (0.7.3) + rake (>= 0.8.1) ruby-progressbar (1.13.0) rubyzip (2.3.2) selenium-webdriver (4.9.1) @@ -301,7 +298,7 @@ DEPENDENCIES amazing_print bootsnap capybara - debug + debase (>= 0.2.5.beta2) devise importmap-rails jbuilder @@ -311,6 +308,7 @@ DEPENDENCIES rails_semantic_logger rubocop rubocop-rails + ruby-debug-ide selenium-webdriver solargraph sprockets-rails diff --git a/Procfile.dev b/Procfile.dev index 023e98a..29b30b6 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,2 +1,2 @@ -web: bin/rails server -p 3000 +web: rdebug-ide --port 1234 --skip_wait_for_start -- bin/rails s -p 3000 css: bin/rails tailwindcss:watch