A native Ruby debugger using the Debug Adapter Protocol.
Ruby Debug requires the rdap
gem. Install it from the command line:
gem install rdap
Or add it to your project's Gemfile:
gem 'rdap', group :development
- Open a Ruby project folder in VS Code.
- Go to the Debug view from the Activity bar.
- Select "Add Configuration" from the dropdown at the top of the Debug view.
- The Ruby Debug configurations are labeled "Ruby Debug." In this example, we'll use "Ruby Debug: Launch File."
- Change the
program
setting to an executable Ruby file. - Click the "Start Debugging" button in the Debug view.
See the VS Code documentation for more information about using debuggers.
- Standard breakpoints
- Multiple thread support
- Next, step in, step out
- Conditional breakpoints
- Multiple stack frames per thread
- Individual thread control