From f4404bd471823ed1e17847384fed05dfcabf2d58 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sun, 13 Oct 2024 12:43:06 +0800 Subject: [PATCH] Improve Debugging with IRB section to make it easier to get started (#1015) --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index fec8350ef..84c9db465 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,13 @@ Aliases ## Debugging with IRB +### Getting Started + +- In `binding.irb`, use the `debug` command to start a `irb:rdbg` session with access to all `debug.gem` commands. +- Use `RUBY_DEBUG_IRB_CONSOLE=1` environment variable to make `debug.gem` use IRB as the debugging console. + +### Details + Starting from version 1.8.0, IRB boasts a powerful integration with `debug.gem`, providing a debugging experience akin to `pry-byebug`. After hitting a `binding.irb` breakpoint, you can activate the debugger with the `debug` command. Alternatively, if the `debug` method happens to already be defined in the current scope, you can call `irb_debug`.