aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/cmd/break.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-11-21 00:46:22 -0800
committergit <svn-admin@ruby-lang.org>2022-11-21 08:46:27 +0000
commitc9fbc779a680f3e1fd884ec80722cd32a990e0e9 (patch)
treeeaecf5a5673cbd05b9ffb3747ce724323254edb5 /lib/irb/cmd/break.rb
parent65e31402ae46672e87cddb1f2e618d1c00591151 (diff)
downloadruby-c9fbc779a680f3e1fd884ec80722cd32a990e0e9.tar.gz
[ruby/irb] Add commands to start and use the debugger
(https://github.com/ruby/irb/pull/449) * Seamlessly integrate a few debug commands * Improve the break command support * Utilize skip_src option if available * Add step and delete commands * Write end-to-end tests for each debugger command * Add documentation * Add backtrace, info, catch commands https://github.com/ruby/irb/commit/976100c1c2
Diffstat (limited to 'lib/irb/cmd/break.rb')
-rw-r--r--lib/irb/cmd/break.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/irb/cmd/break.rb b/lib/irb/cmd/break.rb
new file mode 100644
index 0000000000..2c82413f6a
--- /dev/null
+++ b/lib/irb/cmd/break.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Break < Debug
+ def self.transform_args(args)
+ args&.dump
+ end
+
+ def execute(args = nil)
+ super(pre_cmds: "break #{args}")
+ end
+ end
+ end
+
+ # :startdoc:
+end