From 175cb659c7544b8ee0c0c0ed0ab3a7772117de86 Mon Sep 17 00:00:00 2001 From: Tony Spataro Date: Tue, 5 Jul 2022 18:59:19 -0700 Subject: [PATCH] Add warning about legacy debug gem --- README.md | 7 +++++-- misc/README.md.erb | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 94ed2390e..b69c063db 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,9 @@ If you use Bundler, write the following line to your Gemfile. gem "debug", ">= 1.0.0" ``` +(The version constraint is important; `debug < 1.0.0` is an older, +abandoned gem that is completely different from this product.) + # HOW TO USE To use a debugger, roughly you will do the following steps: @@ -134,7 +137,7 @@ d => 4 ### Invoke the program from the debugger as a traditional debuggers If you don't want to modify the source code, you can set breakpoints with a debug command `break` (`b` for short). -Using `rdbg` command to launch the program without any modifications, you can run the program with the debugger. +Using `rdbg` command (or `bundle exec rdbg`) to launch the program without any modifications, you can run the program with the debugger. ```shell $ cat target.rb # Sample program @@ -285,7 +288,7 @@ There are multiple ways to run your program as a debuggee: Stop at program start | [`rdbg` option](https://github.com/ruby/debug#rdbg---open-or-rdbg--o-for-short) | [require](https://github.com/ruby/debug#require-debugopen-in-a-program) | [debugger API](https://github.com/ruby/debug#start-by-method) ---|---|---|---| Yes | `rdbg --open` | `require "debug/open"` | `DEBUGGER__.open` -No | `rdbg --open --nonstop` | `require "debug/open_nonstop"` | `DEBUGGER__.open(nonstop: true)` +No | `rdbg --open --nonstop` | `require "debug/open_nonstop"` | `DEBUGGER__.open(nonstop: true)` #### `rdbg --open` (or `rdbg -O` for short) diff --git a/misc/README.md.erb b/misc/README.md.erb index 04aa5720c..62b3b655f 100644 --- a/misc/README.md.erb +++ b/misc/README.md.erb @@ -38,6 +38,9 @@ If you use Bundler, write the following line to your Gemfile. gem "debug", ">= 1.0.0" ``` +(The version constraint is important; `debug < 1.0.0` is an older, +abandoned gem that is completely different from this product.) + # HOW TO USE To use a debugger, roughly you will do the following steps: @@ -134,7 +137,7 @@ d => 4 ### Invoke the program from the debugger as a traditional debuggers If you don't want to modify the source code, you can set breakpoints with a debug command `break` (`b` for short). -Using `rdbg` command to launch the program without any modifications, you can run the program with the debugger. +Using `rdbg` command (or `bundle exec rdbg`) to launch the program without any modifications, you can run the program with the debugger. ```shell $ cat target.rb # Sample program @@ -285,7 +288,7 @@ There are multiple ways to run your program as a debuggee: Stop at program start | [`rdbg` option](https://github.com/ruby/debug#rdbg---open-or-rdbg--o-for-short) | [require](https://github.com/ruby/debug#require-debugopen-in-a-program) | [debugger API](https://github.com/ruby/debug#start-by-method) ---|---|---|---| Yes | `rdbg --open` | `require "debug/open"` | `DEBUGGER__.open` -No | `rdbg --open --nonstop` | `require "debug/open_nonstop"` | `DEBUGGER__.open(nonstop: true)` +No | `rdbg --open --nonstop` | `require "debug/open_nonstop"` | `DEBUGGER__.open(nonstop: true)` #### `rdbg --open` (or `rdbg -O` for short)