File tree 2 files changed +48
-0
lines changed
2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -784,6 +784,30 @@ The `<...>` notation means the argument.
784
784
* Show help for the given command.
785
785
786
786
787
+ ### Using IRB as the Debug Console
788
+
789
+ Starting from version ` v1.9 ` , you can now use IRB as the debug console. This integration brings additional features such as:
790
+
791
+ * Autocompletion
792
+ * Support for multi-line input
793
+ * Access to commands not available in ` debug ` , like ` show_source ` or ` show_doc `
794
+ * [ Configurable command aliases] ( https://docs.ruby-lang.org/en/master/IRB.html#module-IRB-label-Command+Aliases )
795
+
796
+ To switch to the IRB console, simply use the ` irb ` command in the debug console.
797
+
798
+ Once activated, you'll notice the prompt changes to:
799
+
800
+ ``` txt
801
+ irb:rdbg(main):001>
802
+ ```
803
+
804
+ If you want to make IRB the default console for all sessions, configure the ` irb_console ` setting by either:
805
+
806
+ * Setting the ` RUBY_DEBUG_IRB_CONSOLE=true ` environment variable
807
+ * Or adding ` config set irb_console 1 ` to your ` ~/.rdbgrc `
808
+
809
+ To disable the IRB console in the current session, execute ` config set irb_console 0 ` in the console.
810
+
787
811
## Debugger API
788
812
789
813
### Start debugging
Original file line number Diff line number Diff line change @@ -509,6 +509,30 @@ The `<...>` notation means the argument.
509
509
510
510
<%= DEBUGGER__ . help %>
511
511
512
+ ### Using IRB as the Debug Console
513
+
514
+ Starting from version `v1.9`, you can now use IRB as the debug console. This integration brings additional features such as:
515
+
516
+ * Autocompletion
517
+ * Support for multi-line input
518
+ * Access to commands not available in `debug`, like `show_source` or `show_doc`
519
+ * [Configurable command aliases](https://docs.ruby-lang.org/en/master/IRB.html#module-IRB-label-Command+Aliases)
520
+
521
+ To switch to the IRB console, simply use the `irb` command in the debug console.
522
+
523
+ Once activated, you'll notice the prompt changes to:
524
+
525
+ ```txt
526
+ irb:rdbg(main):001>
527
+ ```
528
+
529
+ If you want to make IRB the default console for all sessions, configure the `irb_console` setting by either:
530
+
531
+ * Setting the `RUBY_DEBUG_IRB_CONSOLE=true` environment variable
532
+ * Or adding `config set irb_console 1` to your `~/.rdbgrc`
533
+
534
+ To disable the IRB console in the current session, execute `config set irb_console 0` in the console.
535
+
512
536
## Debugger API
513
537
514
538
### Start debugging
You can’t perform that action at this time.
0 commit comments