From ef0879f4aa52b32b697c6daba0228079bd430fda Mon Sep 17 00:00:00 2001 From: Meredith Date: Mon, 8 Apr 2024 08:14:15 -0400 Subject: [PATCH] Update ruby VSCode extensions for debugging (#20816) The 'rebornix.Ruby' extension is deprecated. I replaced with the 'Shopify.ruby-lsp' extension since VSCode's Ruby docs pointed users to ruby-lsp, see https://code.visualstudio.com/docs/languages/ruby. --- .vscode/extensions.json | 1 + .vscode/launch.json | 42 ++++++----------------------------------- .vscode/settings.json | 11 ++--------- 3 files changed, 9 insertions(+), 45 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 07994ff40..d18bf2f2d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,5 +13,6 @@ "waderyan.nodejs-extension-pack", "koichisasada.vscode-rdbg", "ms-edgedevtools.vscode-edge-devtools", + "shopify.ruby-lsp", ] } diff --git a/.vscode/launch.json b/.vscode/launch.json index 4bf5353e8..7d68ba3b0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -26,51 +26,21 @@ "webRoot": "${workspaceFolder}/app/javascript/packs" }, { - "name": "Debug Local File", - "type": "Ruby", - "request": "launch", - "cwd": "${workspaceRoot}", - "program": "${workspaceRoot}/main.rb" - }, - { - "name": "Listen for rdebug-ide", - "type": "Ruby", - "request": "attach", - "cwd": "${workspaceRoot}", - "remoteHost": "127.0.0.1", - "remotePort": "1234", - "remoteWorkspaceRoot": "${workspaceRoot}" - }, - { - "name": "Rails server", - "type": "Ruby", - "request": "launch", - "cwd": "${workspaceRoot}", - "program": "${workspaceRoot}/bin/rails", - "args": ["server"] + "name": "Attach to Existing Server", + "type": "ruby_lsp", + "request": "attach" }, { "name": "RSpec - all", - "type": "Ruby", + "type": "ruby_lsp", "request": "launch", - "cwd": "${workspaceRoot}", "program": "${workspaceRoot}/bin/rspec", - "args": ["-I", "${workspaceRoot}"] }, { "name": "RSpec - active spec file only", - "type": "Ruby", + "type": "ruby_lsp", "request": "launch", - "cwd": "${workspaceRoot}", - "program": "${workspaceRoot}/bin/rspec", - "args": ["-I", "${workspaceRoot}", "${file}"] - }, - { - "name": "Cucumber", - "type": "Ruby", - "request": "launch", - "cwd": "${workspaceRoot}", - "program": "${workspaceRoot}/bin/cucumber" + "program": "${workspaceRoot}/bin/rspec ${file}", }, { "name": "Jest Current File", diff --git a/.vscode/settings.json b/.vscode/settings.json index 7de1b8db0..3ae8e3cd7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,4 @@ { - "ruby.useBundler": true, - "ruby.useLanguageServer": true, - "ruby.lint": { - "rubocop": { - "useBundler": true - } - }, - "ruby.format": "rubocop", - "ruby.intellisense": "rubyLocate" + "rubyLsp.rubyVersionManager": "auto", + "rubyLsp.formatter": "rubocop", }