From ab22f3910d51703ddf832e46c2a5e845b4703f50 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 18 Apr 2025 12:19:38 +0900 Subject: [PATCH] Mention VS Code debugger configuration in debugging guide --- doc/contributing/building_ruby.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/contributing/building_ruby.md b/doc/contributing/building_ruby.md index 5037c8a78e..c0eafe182f 100644 --- a/doc/contributing/building_ruby.md +++ b/doc/contributing/building_ruby.md @@ -248,6 +248,16 @@ following make targets: * `make lldb-ruby`: Runs `test.rb` using Ruby in lldb * `make gdb-ruby`: Runs `test.rb` using Ruby in gdb +For VS Code users, you can set up editor-based debugging experience by running: + +```shell +cp -r misc/.vscode .vscode +``` + +This will add launch configurations for debugging Ruby itself by running `test.rb` with `lldb`. + +**Note**: if you build Ruby under the `./build` folder, you'll need to update `.vscode/launch.json`'s program entry accordingly to: `"${workspaceFolder}/build/ruby"` + ### Compiling for Debugging You should configure Ruby without optimization and other flags that may