From 5253dc0cd598e96f7a361e15a03442d80a701ff7 Mon Sep 17 00:00:00 2001 From: James Ball Date: Mon, 16 Dec 2024 22:12:56 +0000 Subject: [PATCH 1/3] Adding support for VSCode rdbg Ruby debugger extension --- .devcontainer/Dockerfile | 1 + .vscode/launch.json | 17 +++++++++++++++++ Gemfile | 1 + Gemfile.lock | 19 +++++++++++++++++++ bin/.container-tag | 2 +- container.def | 1 + 6 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index dc8c8f2e1..af80dfb72 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -11,6 +11,7 @@ RUN apt-get install -y --no-install-recommends bundler RUN apt-get install -y --no-install-recommends nodejs RUN apt-get install -y --no-install-recommends npm RUN apt-get install -y --no-install-recommends ditaa +RUN apt-get install -y --no-install-recommends libyaml-dev RUN apt-get clean autoclean RUN apt-get autoremove -y RUN rm -rf /var/lib/{apt, dpkg, cache, log} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..4d6553795 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // 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": [ + { + "type": "rdbg", + "name": "RVA20 Profile", + "request": "launch", + "command": "bundle exec rake", + "script": "gen:profile[RVA20]", + "args": [], + "askParameters": false + } + ] +} \ No newline at end of file diff --git a/Gemfile b/Gemfile index 8ad685012..eb360e885 100644 --- a/Gemfile +++ b/Gemfile @@ -24,4 +24,5 @@ group :development do gem 'rubocop-minitest' gem 'ruby-prof' gem "ruby-prof-flamegraph" + gem "rdbg" end diff --git a/Gemfile.lock b/Gemfile.lock index 5774c3639..0a897582c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,10 +33,18 @@ GEM concurrent-ruby (1.3.3) css_parser (1.17.1) addressable + date (3.4.1) + debug (1.9.2) + irb (~> 1.10) + reline (>= 0.3.8) diff-lcs (1.5.1) e2mmap (0.1.0) hana (1.3.7) hashery (2.1.2) + io-console (0.8.0) + irb (1.14.2) + rdoc (>= 4.0.0) + reline (>= 0.4.2) jaro_winkler (1.6.0) json (2.7.2) json_schemer (1.0.3) @@ -81,13 +89,22 @@ GEM prawn-templates (0.1.2) pdf-reader (~> 2.0) prawn (~> 2.2) + psych (5.2.1) + date + stringio public_suffix (6.0.0) pygments.rb (3.0.0) racc (1.8.0) rainbow (3.1.1) rake (13.2.1) rbs (2.8.4) + rdbg (0.1.0) + debug (>= 1.2.2) + rdoc (6.9.1) + psych (>= 4.0.0) regexp_parser (2.9.2) + reline (0.6.0) + io-console (~> 0.5) reverse_markdown (2.1.1) nokogiri rexml (3.2.8) @@ -131,6 +148,7 @@ GEM thor (~> 1.0) tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) + stringio (3.1.2) strscan (3.1.0) thor (1.3.1) tilt (2.3.0) @@ -154,6 +172,7 @@ DEPENDENCIES minitest pygments.rb rake (~> 13.0) + rdbg rouge rubocop-minitest ruby-prof diff --git a/bin/.container-tag b/bin/.container-tag index be5863417..bd73f4707 100644 --- a/bin/.container-tag +++ b/bin/.container-tag @@ -1 +1 @@ -0.3 +0.4 diff --git a/container.def b/container.def index 534320d65..544c9446c 100644 --- a/container.def +++ b/container.def @@ -26,6 +26,7 @@ From: ubuntu:24.04 apt-get install -y --no-install-recommends npm apt-get install -y --no-install-recommends ditaa + apt-get install -y --no-install-recommends libyaml-dev # cleanup apt-get clean autoclean From 4250cb029cc718ace607fca0303c52f22cead020 Mon Sep 17 00:00:00 2001 From: James Ball Date: Tue, 17 Dec 2024 20:13:30 +0000 Subject: [PATCH 2/3] Adding bogus change to launch.json comment to see if pre-commit check runs when I click Commit in VSCode. --- .vscode/launch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 4d6553795..00c979efc 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,7 +1,7 @@ { // 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 + // For more information, please visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { From 015d6b4a7dc97da49592cf517625d3cb13a51feb Mon Sep 17 00:00:00 2001 From: James Ball Date: Tue, 17 Dec 2024 20:22:33 +0000 Subject: [PATCH 3/3] Removed comment in JSON and added stupid extra line at end of text file to pass pre-commit checks. --- .vscode/launch.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 00c979efc..49049c116 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,7 +1,4 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, please visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { @@ -14,4 +11,4 @@ "askParameters": false } ] -} \ No newline at end of file +}