debug 1.7.2 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +47 -41
- data/debug.gemspec +3 -3
- data/ext/debug/debug.c +6 -0
- data/ext/debug/extconf.rb +1 -0
- data/ext/debug/iseq_collector.c +2 -0
- data/lib/debug/client.rb +3 -2
- data/lib/debug/config.rb +13 -6
- data/lib/debug/console.rb +8 -29
- data/lib/debug/dap_custom/traceInspector.rb +336 -0
- data/lib/debug/frame_info.rb +9 -0
- data/lib/debug/irb_integration.rb +27 -0
- data/lib/debug/server.rb +5 -3
- data/lib/debug/server_cdp.rb +11 -13
- data/lib/debug/server_dap.rb +191 -160
- data/lib/debug/session.rb +63 -29
- data/lib/debug/source_repository.rb +1 -1
- data/lib/debug/thread_client.rb +42 -24
- data/lib/debug/version.rb +1 -1
- data/misc/README.md.erb +41 -41
- metadata +12 -10
    
        data/lib/debug/thread_client.rb
    CHANGED
    
    | @@ -5,6 +5,10 @@ require 'pp' | |
| 5 5 |  | 
| 6 6 | 
             
            require_relative 'color'
         | 
| 7 7 |  | 
| 8 | 
            +
            class ::Thread
         | 
| 9 | 
            +
              attr_accessor :debug_thread_client
         | 
| 10 | 
            +
            end
         | 
| 11 | 
            +
             | 
| 8 12 | 
             
            module DEBUGGER__
         | 
| 9 13 | 
             
              M_INSTANCE_VARIABLES = method(:instance_variables).unbind
         | 
| 10 14 | 
             
              M_INSTANCE_VARIABLE_GET = method(:instance_variable_get).unbind
         | 
| @@ -14,6 +18,7 @@ module DEBUGGER__ | |
| 14 18 | 
             
              M_RESPOND_TO_P = method(:respond_to?).unbind
         | 
| 15 19 | 
             
              M_METHOD = method(:method).unbind
         | 
| 16 20 | 
             
              M_OBJECT_ID = method(:object_id).unbind
         | 
| 21 | 
            +
              M_NAME = method(:name).unbind
         | 
| 17 22 |  | 
| 18 23 | 
             
              module SkipPathHelper
         | 
| 19 24 | 
             
                def skip_path?(path)
         | 
| @@ -47,12 +52,7 @@ module DEBUGGER__ | |
| 47 52 |  | 
| 48 53 | 
             
              class ThreadClient
         | 
| 49 54 | 
             
                def self.current
         | 
| 50 | 
            -
                   | 
| 51 | 
            -
                    thc
         | 
| 52 | 
            -
                  else
         | 
| 53 | 
            -
                    thc = SESSION.get_thread_client
         | 
| 54 | 
            -
                    Thread.current[:DEBUGGER__ThreadClient] = thc
         | 
| 55 | 
            -
                  end
         | 
| 55 | 
            +
                  Thread.current.debug_thread_client ||= SESSION.get_thread_client
         | 
| 56 56 | 
             
                end
         | 
| 57 57 |  | 
| 58 58 | 
             
                include Color
         | 
| @@ -468,10 +468,14 @@ module DEBUGGER__ | |
| 468 468 | 
             
                  if file_lines = frame.file_lines
         | 
| 469 469 | 
             
                    frame_line = frame.location.lineno - 1
         | 
| 470 470 |  | 
| 471 | 
            -
                     | 
| 472 | 
            -
                       | 
| 473 | 
            -
             | 
| 474 | 
            -
                       | 
| 471 | 
            +
                    if CONFIG[:no_lineno]
         | 
| 472 | 
            +
                      lines = file_lines
         | 
| 473 | 
            +
                    else
         | 
| 474 | 
            +
                      lines = file_lines.map.with_index do |e, i|
         | 
| 475 | 
            +
                        cur = i == frame_line ? '=>' : '  '
         | 
| 476 | 
            +
                        line = colorize_dim('%4d|' % (i+1))
         | 
| 477 | 
            +
                        "#{cur}#{line} #{e}"
         | 
| 478 | 
            +
                      end
         | 
| 475 479 | 
             
                    end
         | 
| 476 480 |  | 
| 477 481 | 
             
                    unless start_line
         | 
| @@ -607,12 +611,17 @@ module DEBUGGER__ | |
| 607 611 |  | 
| 608 612 | 
             
                def get_consts expr = nil, only_self: false, &block
         | 
| 609 613 | 
             
                  if expr && !expr.empty?
         | 
| 610 | 
            -
                     | 
| 611 | 
            -
             | 
| 612 | 
            -
             | 
| 613 | 
            -
                       | 
| 614 | 
            +
                    begin
         | 
| 615 | 
            +
                      _self = frame_eval(expr, re_raise: true)
         | 
| 616 | 
            +
                    rescue Exception
         | 
| 617 | 
            +
                      # ignore
         | 
| 614 618 | 
             
                    else
         | 
| 615 | 
            -
                       | 
| 619 | 
            +
                      if M_KIND_OF_P.bind_call(_self, Module)
         | 
| 620 | 
            +
                        iter_consts _self, &block
         | 
| 621 | 
            +
                        return
         | 
| 622 | 
            +
                      else
         | 
| 623 | 
            +
                        puts "#{_self.inspect} (by #{expr}) is not a Module."
         | 
| 624 | 
            +
                      end
         | 
| 616 625 | 
             
                    end
         | 
| 617 626 | 
             
                  elsif _self = current_frame&.self
         | 
| 618 627 | 
             
                    cs = {}
         | 
| @@ -852,8 +861,18 @@ module DEBUGGER__ | |
| 852 861 | 
             
                class SuspendReplay < Exception
         | 
| 853 862 | 
             
                end
         | 
| 854 863 |  | 
| 864 | 
            +
                if ::Fiber.respond_to?(:blocking)
         | 
| 865 | 
            +
                  private def fiber_blocking
         | 
| 866 | 
            +
                    ::Fiber.blocking{yield}
         | 
| 867 | 
            +
                  end
         | 
| 868 | 
            +
                else
         | 
| 869 | 
            +
                  private def fiber_blocking
         | 
| 870 | 
            +
                    yield
         | 
| 871 | 
            +
                  end
         | 
| 872 | 
            +
                end
         | 
| 873 | 
            +
             | 
| 855 874 | 
             
                def wait_next_action
         | 
| 856 | 
            -
                  wait_next_action_
         | 
| 875 | 
            +
                  fiber_blocking{wait_next_action_}
         | 
| 857 876 | 
             
                rescue SuspendReplay
         | 
| 858 877 | 
             
                  replay_suspend
         | 
| 859 878 | 
             
                end
         | 
| @@ -1038,13 +1057,8 @@ module DEBUGGER__ | |
| 1038 1057 | 
             
                      when :call
         | 
| 1039 1058 | 
             
                        result = frame_eval(eval_src)
         | 
| 1040 1059 | 
             
                      when :irb
         | 
| 1041 | 
            -
                         | 
| 1042 | 
            -
                         | 
| 1043 | 
            -
                          result = frame_eval('binding.irb(show_code: false)', binding_location: true)
         | 
| 1044 | 
            -
                        ensure
         | 
| 1045 | 
            -
                          # workaround: https://github.com/ruby/debug/issues/308
         | 
| 1046 | 
            -
                          Reline.prompt_proc = nil if defined? Reline
         | 
| 1047 | 
            -
                        end
         | 
| 1060 | 
            +
                        require_relative "irb_integration"
         | 
| 1061 | 
            +
                        activate_irb_integration
         | 
| 1048 1062 | 
             
                      when :display, :try_display
         | 
| 1049 1063 | 
             
                        failed_results = []
         | 
| 1050 1064 | 
             
                        eval_src.each_with_index{|src, i|
         | 
| @@ -1300,10 +1314,14 @@ module DEBUGGER__ | |
| 1300 1314 | 
             
                          frame._callee = b.eval('__callee__')
         | 
| 1301 1315 | 
             
                        end
         | 
| 1302 1316 | 
             
                      }
         | 
| 1303 | 
            -
                       | 
| 1317 | 
            +
                      append(frames)
         | 
| 1304 1318 | 
             
                    }
         | 
| 1305 1319 | 
             
                  end
         | 
| 1306 1320 |  | 
| 1321 | 
            +
                  def append frames
         | 
| 1322 | 
            +
                    @log << frames
         | 
| 1323 | 
            +
                  end
         | 
| 1324 | 
            +
             | 
| 1307 1325 | 
             
                  def enable
         | 
| 1308 1326 | 
             
                    unless @tp_recorder.enabled?
         | 
| 1309 1327 | 
             
                      @log.clear
         | 
    
        data/lib/debug/version.rb
    CHANGED
    
    
    
        data/misc/README.md.erb
    CHANGED
    
    | @@ -2,9 +2,9 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            # debug.rb
         | 
| 4 4 |  | 
| 5 | 
            -
            This library provides debugging functionality to Ruby (MRI) 2. | 
| 5 | 
            +
            This library provides debugging functionality to Ruby (MRI) 2.7 and later.
         | 
| 6 6 |  | 
| 7 | 
            -
            This debug.rb is replacement of traditional lib/debug.rb standard library which is implemented by `set_trace_func`.
         | 
| 7 | 
            +
            This debug.rb is the replacement of traditional lib/debug.rb standard library, which is implemented by `set_trace_func`.
         | 
| 8 8 | 
             
            New debug.rb has several advantages:
         | 
| 9 9 |  | 
| 10 10 | 
             
            * Fast: No performance penalty on non-stepping mode and non-breakpoints.
         | 
| @@ -18,7 +18,7 @@ New debug.rb has several advantages: | |
| 18 18 | 
             
                 Connection | UDS, TCP/IP | UDS, TCP/IP | TCP/IP |
         | 
| 19 19 | 
             
                 Requirement | No | [vscode-rdbg](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg) | Chrome |
         | 
| 20 20 |  | 
| 21 | 
            -
            * Extensible: application can introduce debugging support  | 
| 21 | 
            +
            * Extensible: application can introduce debugging support in several ways:
         | 
| 22 22 | 
             
              * By `rdbg` command
         | 
| 23 23 | 
             
              * By loading libraries with `-r` command line option
         | 
| 24 24 | 
             
              * By calling Ruby's method explicitly
         | 
| @@ -55,7 +55,7 @@ To use a debugger, roughly you will do the following steps: | |
| 55 55 | 
             
            4. Use debug commands.
         | 
| 56 56 | 
             
                * [Evaluate Ruby expressions](#evaluate) (e.g. `p lvar` to see the local variable `lvar`).
         | 
| 57 57 | 
             
                * [Query the program status](#information) (e.g. `info` to see information about the current frame).
         | 
| 58 | 
            -
                * [Control program flow](#control-flow) (e.g. move to  | 
| 58 | 
            +
                * [Control program flow](#control-flow) (e.g. move to another line with `step`, to the next line with `next`).
         | 
| 59 59 | 
             
                * [Set another breakpoint](#breakpoint) (e.g. `catch Exception` to set a breakpoint that'll be triggered when `Exception` is raised).
         | 
| 60 60 | 
             
                * [Activate tracing in your program](#trace) (e.g. `trace call` to trace method calls).
         | 
| 61 61 | 
             
                * [Change the configuration](#configuration-1) (e.g. `config set no_color true` to disable coloring).
         | 
| @@ -180,7 +180,7 @@ DEBUGGER: Session start (pid: 7656) | |
| 180 180 | 
             
            #1  BP - Line  /mnt/c/ko1/src/rb/ruby-debug/target.rb:5 (line)
         | 
| 181 181 | 
             
            ```
         | 
| 182 182 |  | 
| 183 | 
            -
            You can see that two breakpoints are registered. Let's continue the program by `continue` command.
         | 
| 183 | 
            +
            You can see that two breakpoints are registered. Let's continue the program by using the `continue` command.
         | 
| 184 184 |  | 
| 185 185 | 
             
            ```shell
         | 
| 186 186 | 
             
            (rdbg) continue
         | 
| @@ -200,8 +200,8 @@ Stop by #0  BP - Line  /mnt/c/ko1/src/rb/ruby-debug/target.rb:3 (line) | |
| 200 200 | 
             
            ```
         | 
| 201 201 |  | 
| 202 202 | 
             
            You can see that we can stop at line 3.
         | 
| 203 | 
            -
            Let's see the local variables with `info` command, and continue.
         | 
| 204 | 
            -
            You can also confirm that the program will suspend at line 5 and you can use `info` command again.
         | 
| 203 | 
            +
            Let's see the local variables with the `info` command, and continue.
         | 
| 204 | 
            +
            You can also confirm that the program will suspend at line 5 and you can use the `info` command again.
         | 
| 205 205 |  | 
| 206 206 | 
             
            ```shell
         | 
| 207 207 | 
             
            (rdbg) info
         | 
| @@ -238,14 +238,14 @@ d => 4 | |
| 238 238 | 
             
            ```
         | 
| 239 239 |  | 
| 240 240 | 
             
            By the way, using `rdbg` command you can suspend your application with `C-c` (SIGINT) and enter the debug console.
         | 
| 241 | 
            -
            It will help  | 
| 241 | 
            +
            It will help if you want to know what the program is doing.
         | 
| 242 242 |  | 
| 243 243 | 
             
            ### Use `rdbg` with commands written in Ruby
         | 
| 244 244 |  | 
| 245 | 
            -
            If you want to run a command written in Ruby like  | 
| 245 | 
            +
            If you want to run a command written in Ruby like `rake`, `rails`, `bundle`, `rspec`, and so on, you can use `rdbg -c` option.
         | 
| 246 246 |  | 
| 247 247 | 
             
            * Without `-c` option, `rdbg <name>` means that `<name>` is Ruby script and invoke it like `ruby <name>` with the debugger.
         | 
| 248 | 
            -
            * With `-c` option, `rdbg -c <name>` means that `<name>` is command in `PATH` and simply  | 
| 248 | 
            +
            * With `-c` option, `rdbg -c <name>` means that `<name>` is a command in `PATH` and simply invokes it with the debugger.
         | 
| 249 249 |  | 
| 250 250 | 
             
            Examples:
         | 
| 251 251 | 
             
            * `rdbg -c -- rails server`
         | 
| @@ -263,27 +263,27 @@ Like other languages, you can use this debugger on the VSCode. | |
| 263 263 |  | 
| 264 264 | 
             
            1. Install [VSCode rdbg Ruby Debugger - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg)
         | 
| 265 265 | 
             
            2. Open `.rb` file (e.g. `target.rb`)
         | 
| 266 | 
            -
            3. Register breakpoints with "Toggle breakpoint" in Run menu (or type F9 key)
         | 
| 266 | 
            +
            3. Register breakpoints with "Toggle breakpoint" in the Run menu (or type F9 key)
         | 
| 267 267 | 
             
            4. Choose "Start debugging" in "Run" menu (or type F5 key)
         | 
| 268 | 
            -
            5. You will see a dialog "Debug command line" and you can choose your favorite command line  | 
| 269 | 
            -
            6. Chosen command line is invoked with `rdbg -c | 
| 268 | 
            +
            5. You will see a dialog "Debug command line" and you can choose your favorite command line you want to run.
         | 
| 269 | 
            +
            6. Chosen command line is invoked with `rdbg -c`, and VSCode shows the details at breakpoints.
         | 
| 270 270 |  | 
| 271 | 
            -
            Please refer [Debugging in Visual Studio Code](https://code.visualstudio.com/docs/editor/debugging) for operations on VSCode.
         | 
| 271 | 
            +
            Please refer to [Debugging in Visual Studio Code](https://code.visualstudio.com/docs/editor/debugging) for operations on VSCode.
         | 
| 272 272 |  | 
| 273 273 | 
             
            You can configure the extension in `.vscode/launch.json`.
         | 
| 274 274 | 
             
            Please see the extension page for more details.
         | 
| 275 275 |  | 
| 276 276 | 
             
            ## Remote debugging
         | 
| 277 277 |  | 
| 278 | 
            -
            You can use this debugger as a remote debugger. For example, it will help the following situations:
         | 
| 278 | 
            +
            You can use this debugger as a remote debugger. For example, it will help in the following situations:
         | 
| 279 279 |  | 
| 280 | 
            -
            * Your application does not run on TTY and it is hard to use `binding.pry` or `binding.irb`.
         | 
| 281 | 
            -
              * Your application is running on Docker container and there is no TTY.
         | 
| 280 | 
            +
            * Your application does not run on TTY, and it is hard to use `binding.pry` or `binding.irb`.
         | 
| 281 | 
            +
              * Your application is running on a Docker container, and there is no TTY.
         | 
| 282 282 | 
             
              * Your application is running as a daemon.
         | 
| 283 283 | 
             
              * Your application uses pipe for STDIN or STDOUT.
         | 
| 284 284 | 
             
            * Your application is running as a daemon and you want to query the running status (checking a backtrace and so on).
         | 
| 285 285 |  | 
| 286 | 
            -
            You can run your application as a remote debuggee and the remote debugger console can attach to the debuggee anytime.
         | 
| 286 | 
            +
            You can run your application as a remote debuggee, and the remote debugger console can attach to the debuggee anytime.
         | 
| 287 287 |  | 
| 288 288 | 
             
            ### Invoke as a remote debuggee
         | 
| 289 289 |  | 
| @@ -305,7 +305,7 @@ DEBUGGER: Debugger can attach via UNIX domain socket (/home/ko1/.ruby-debug-sock | |
| 305 305 | 
             
            DEBUGGER: wait for debugger connection...
         | 
| 306 306 | 
             
            ```
         | 
| 307 307 |  | 
| 308 | 
            -
            By default, `rdbg --open` uses UNIX domain socket and generates path name automatically (`/home/ko1/.ruby-debug-sock/ruby-debug-ko1-7773` in this case).
         | 
| 308 | 
            +
            By default, `rdbg --open` uses UNIX domain socket and generates the path name automatically (`/home/ko1/.ruby-debug-sock/ruby-debug-ko1-7773` in this case).
         | 
| 309 309 |  | 
| 310 310 | 
             
            You can connect to the debuggee with `rdbg --attach` command (`rdbg -A` for short).
         | 
| 311 311 |  | 
| @@ -324,11 +324,11 @@ $ rdbg -A | |
| 324 324 | 
             
            (rdbg:remote)
         | 
| 325 325 | 
             
            ```
         | 
| 326 326 |  | 
| 327 | 
            -
            If there  | 
| 327 | 
            +
            If there are no other opening ports on the default directory, `rdbg --attach` command chooses the only one opening UNIX domain socket and connects to it. If there are more files, you need to specify the file.
         | 
| 328 328 |  | 
| 329 | 
            -
            When `rdbg --attach` connects to the debuggee, you can use any debug commands (set breakpoints, continue the program and so on) like local debug console. When  | 
| 329 | 
            +
            When `rdbg --attach` connects to the debuggee, you can use any debug commands (set breakpoints, continue the program, and so on) like the local debug console. When a debuggee program exits, the remote console will also terminate.
         | 
| 330 330 |  | 
| 331 | 
            -
            NOTE: If you use `quit` command, only remote console exits and the debuggee program continues to run (and you can connect it again). If you want to exit the debuggee program, use `kill` command.
         | 
| 331 | 
            +
            NOTE: If you use the `quit` command, only the remote console exits and the debuggee program continues to run (and you can connect it again). If you want to exit the debuggee program, use `kill` command.
         | 
| 332 332 |  | 
| 333 333 | 
             
            If you want to use TCP/IP for the remote debugging, you need to specify the port and host with `--port` like `rdbg --open --port 12345` and it binds to `localhost:12345`.
         | 
| 334 334 |  | 
| @@ -343,11 +343,11 @@ Note that all messages communicated between the debugger and the debuggee are *N | |
| 343 343 |  | 
| 344 344 | 
             
            #### `require 'debug/open'` in a program
         | 
| 345 345 |  | 
| 346 | 
            -
            If you can modify the program, you can open debugging port by adding `require 'debug/open'` line in the program.
         | 
| 346 | 
            +
            If you can modify the program, you can open the debugging port by adding `require 'debug/open'` line in the program.
         | 
| 347 347 |  | 
| 348 348 | 
             
            If you don't want to stop the program at the beginning, you can also use `require 'debug/open_nonstop'`.
         | 
| 349 349 | 
             
            Using `debug/open_nonstop` is useful if you want to open a backdoor to the application.
         | 
| 350 | 
            -
            However, it is also  | 
| 350 | 
            +
            However, it is also dangerous because it can become another vulnerability.
         | 
| 351 351 | 
             
            Please use it carefully.
         | 
| 352 352 |  | 
| 353 353 | 
             
            By default, UNIX domain socket is used for the debugging port. To use TCP/IP, you can set the `RUBY_DEBUG_PORT` environment variable.
         | 
| @@ -372,7 +372,7 @@ Also `open` command allows opening the debug port. | |
| 372 372 |  | 
| 373 373 | 
             
            ([vscode-rdbg v0.0.9](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg) or later is required)
         | 
| 374 374 |  | 
| 375 | 
            -
            If you don't run a debuggee Ruby process on VSCode, you can attach  | 
| 375 | 
            +
            If you don't run a debuggee Ruby process on VSCode, you can attach it to VSCode later with the following steps.
         | 
| 376 376 |  | 
| 377 377 | 
             
            `rdbg --open=vscode` opens the debug port and tries to invoke the VSCode (`code` command).
         | 
| 378 378 |  | 
| @@ -425,7 +425,7 @@ If your application is running on a SSH remote host, please try: | |
| 425 425 |  | 
| 426 426 | 
             
            ```
         | 
| 427 427 |  | 
| 428 | 
            -
            and try to use proposed commands.
         | 
| 428 | 
            +
            and try to use the proposed commands.
         | 
| 429 429 |  | 
| 430 430 | 
             
            Note that you can attach with `rdbg --attach` and continue REPL debugging.
         | 
| 431 431 |  | 
| @@ -443,7 +443,7 @@ DEBUGGER: With Chrome browser, type the following URL in the address-bar: | |
| 443 443 | 
             
            DEBUGGER: wait for debugger connection...
         | 
| 444 444 | 
             
            ```
         | 
| 445 445 |  | 
| 446 | 
            -
            Type `devtools://devtools/bundled/inspector.html?v8only=true&panel=sources&ws=127.0.0.1:57231/b32a55cd-2eb5-4c5c-87d8-b3dfc59d80ef` in the address | 
| 446 | 
            +
            Type `devtools://devtools/bundled/inspector.html?v8only=true&panel=sources&ws=127.0.0.1:57231/b32a55cd-2eb5-4c5c-87d8-b3dfc59d80ef` in the address bar on Chrome browser, and you can continue the debugging with chrome browser.
         | 
| 447 447 |  | 
| 448 448 | 
             
            Also `open chrome` command works like `open vscode`.
         | 
| 449 449 |  | 
| @@ -456,7 +456,7 @@ When the debug session is started, initial scripts are loaded so you can put you | |
| 456 456 |  | 
| 457 457 | 
             
            ### Configuration list
         | 
| 458 458 |  | 
| 459 | 
            -
            You can configure debugger's behavior with environment variables and `config` command. Each configuration has environment variable and  | 
| 459 | 
            +
            You can configure the debugger's behavior with environment variables and `config` command. Each configuration has an environment variable and a name which can be specified by `config` command.
         | 
| 460 460 |  | 
| 461 461 | 
             
            ```
         | 
| 462 462 | 
             
            # configuration example
         | 
| @@ -473,7 +473,7 @@ There are other environment variables: | |
| 473 473 |  | 
| 474 474 | 
             
            * `NO_COLOR`: If the value is set, set `RUBY_DEBUG_NO_COLOR` ([NO_COLOR: disabling ANSI color output in various Unix commands](https://no-color.org/)).
         | 
| 475 475 | 
             
            * `RUBY_DEBUG_ENABLE`: If the value is `0`, do not enable debug.gem feature.
         | 
| 476 | 
            -
            * `RUBY_DEBUG_ADDED_RUBYOPT`: Remove this value from `RUBYOPT` at first. This feature helps loading debug.gem with `RUBYOPT='-r debug/...' | 
| 476 | 
            +
            * `RUBY_DEBUG_ADDED_RUBYOPT`: Remove this value from `RUBYOPT` at first. This feature helps loading debug.gem with `RUBYOPT='-r debug/...'`, and you don't want to derive it to child processes. In this case, you can set `RUBY_DEBUG_ADDED_RUBYOPT='-r debug/...'` (same value), and this string will be deleted from `RUBYOPT` at first.
         | 
| 477 477 | 
             
            * `RUBY_DEBUG_EDITOR` or `EDITOR`: An editor used by `edit` debug command.
         | 
| 478 478 | 
             
            * `RUBY_DEBUG_BB`: Define `Kernel#bb` method which is alias of `Kernel#debugger`.
         | 
| 479 479 |  | 
| @@ -485,7 +485,7 @@ If there is `~/.rdbgrc`, the file is loaded as an initial script (which contains | |
| 485 485 | 
             
            * You can specify the initial script with `rdbg -x initial_script` (like gdb's `-x` option).
         | 
| 486 486 |  | 
| 487 487 | 
             
            Initial scripts are useful to write your favorite configurations.
         | 
| 488 | 
            -
            For example, you can set  | 
| 488 | 
            +
            For example, you can set breakpoints with `break file:123` in `~/.rdbgrc`.
         | 
| 489 489 |  | 
| 490 490 | 
             
            If there are `~/.rdbgrc.rb` is available, it is also loaded as a ruby script at same timing.
         | 
| 491 491 |  | 
| @@ -495,16 +495,16 @@ On the debug console, you can use the following debug commands. | |
| 495 495 |  | 
| 496 496 | 
             
            There are additional features:
         | 
| 497 497 |  | 
| 498 | 
            -
            * `<expr>` without debug command is almost same as `pp <expr>`.
         | 
| 499 | 
            -
              * If the input line `<expr>` does *NOT* start with any debug command, the line `<expr>` will be evaluated as a Ruby expression and the result will be printed with `pp` method. So that the input `foo.bar` is same as `pp foo.bar`.
         | 
| 500 | 
            -
              * If `<expr>` is recognized as a debug command, of course it is not evaluated as a Ruby expression | 
| 501 | 
            -
              * So the author (Koichi Sasada) recommends  | 
| 498 | 
            +
            * `<expr>` without debug command is almost the same as `pp <expr>`.
         | 
| 499 | 
            +
              * If the input line `<expr>` does *NOT* start with any debug command, the line `<expr>` will be evaluated as a Ruby expression, and the result will be printed with `pp` method. So that the input `foo.bar` is the same as `pp foo.bar`.
         | 
| 500 | 
            +
              * If `<expr>` is recognized as a debug command, of course, it is not evaluated as a Ruby expression but is executed as debug command. For example, you can not evaluate such single-letter local variables `i`, `b`, `n`, `c` because they are single-letter debug commands. Use `p i` instead.
         | 
| 501 | 
            +
              * So the author (Koichi Sasada) recommends using `p`, `pp` or `eval` command to evaluate the Ruby expression every time.
         | 
| 502 502 | 
             
            * `Enter` without any input repeats the last command (useful when repeating `step`s) for some commands.
         | 
| 503 503 | 
             
            * `Ctrl-D` is equal to `quit` command.
         | 
| 504 504 | 
             
            * [debug command compare sheet - Google Sheets](https://docs.google.com/spreadsheets/d/1TlmmUDsvwK4sSIyoMv-io52BUUz__R5wpu-ComXlsw0/edit?usp=sharing)
         | 
| 505 505 |  | 
| 506 506 | 
             
            You can use the following debug commands. Each command should be written in 1 line.
         | 
| 507 | 
            -
            The `[...]` notation means this part can be  | 
| 507 | 
            +
            The `[...]` notation means this part can be eliminated. For example, `s[tep]` means `s` or `step` is a valid command. `ste` is not valid.
         | 
| 508 508 | 
             
            The `<...>` notation means the argument.
         | 
| 509 509 |  | 
| 510 510 | 
             
            <%= DEBUGGER__.help %>
         | 
| @@ -541,7 +541,7 @@ Emacs support available. | |
| 541 541 |  | 
| 542 542 | 
             
            #### Start by method
         | 
| 543 543 |  | 
| 544 | 
            -
            After loading `debug/session`, you can start debug session with the following methods. They are convenient if you want to specify debug configurations in your program.
         | 
| 544 | 
            +
            After loading `debug/session`, you can start a debug session with the following methods. They are convenient if you want to specify debug configurations in your program.
         | 
| 545 545 |  | 
| 546 546 | 
             
            * `DEBUGGER__.start(**kw)`: start debug session with local console.
         | 
| 547 547 | 
             
            * `DEBUGGER__.open(**kw)`: open debug port with configuration (without configurations open with UNIX domain socket)
         | 
| @@ -560,9 +560,9 @@ DEBUGGER__.start(no_color: true,    # disable colorize | |
| 560 560 |  | 
| 561 561 | 
             
            ### `binding.break` method
         | 
| 562 562 |  | 
| 563 | 
            -
            `binding.break` (or `binding.b`) set breakpoints at written line. It also has several keywords.
         | 
| 563 | 
            +
            `binding.break` (or `binding.b`) set breakpoints at the written line. It also has several keywords.
         | 
| 564 564 |  | 
| 565 | 
            -
            If `do: 'command'` is specified, the debugger suspends the program  | 
| 565 | 
            +
            If `do: 'command'` is specified, the debugger suspends the program, runs the `command` as a debug command, and continues the program.
         | 
| 566 566 | 
             
            It is useful if you only want to call a debug command and don't want to stop there.
         | 
| 567 567 |  | 
| 568 568 | 
             
            ```
         | 
| @@ -572,9 +572,9 @@ def initialize | |
| 572 572 | 
             
            end
         | 
| 573 573 | 
             
            ```
         | 
| 574 574 |  | 
| 575 | 
            -
             | 
| 575 | 
            +
            In this case, execute the `info` command then register a watch breakpoint for `@a` and continue to run. You can also use `;;` instead of `\n` to separate your commands.
         | 
| 576 576 |  | 
| 577 | 
            -
            If `pre: 'command'` is specified, the debugger suspends the program and  | 
| 577 | 
            +
            If `pre: 'command'` is specified, the debugger suspends the program and runs the `command` as a debug command, and keeps suspended.
         | 
| 578 578 | 
             
            It is useful if you have operations before suspend.
         | 
| 579 579 |  | 
| 580 580 | 
             
            ```
         | 
| @@ -584,7 +584,7 @@ def foo | |
| 584 584 | 
             
            end
         | 
| 585 585 | 
             
            ```
         | 
| 586 586 |  | 
| 587 | 
            -
             | 
| 587 | 
            +
            In this case, you can see the result of `bar()` every time you stop there.
         | 
| 588 588 |  | 
| 589 589 | 
             
            ## rdbg command help
         | 
| 590 590 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,43 +1,43 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: debug
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.9.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Koichi Sasada
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023- | 
| 11 | 
            +
            date: 2023-12-10 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: irb
         | 
| 15 15 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 16 | 
             
                requirements:
         | 
| 17 | 
            -
                - - " | 
| 17 | 
            +
                - - "~>"
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: 1. | 
| 19 | 
            +
                    version: '1.10'
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 | 
            -
                - - " | 
| 24 | 
            +
                - - "~>"
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: 1. | 
| 26 | 
            +
                    version: '1.10'
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 28 | 
             
              name: reline
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 30 | 
             
                requirements:
         | 
| 31 31 | 
             
                - - ">="
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version: 0.3. | 
| 33 | 
            +
                    version: 0.3.8
         | 
| 34 34 | 
             
              type: :runtime
         | 
| 35 35 | 
             
              prerelease: false
         | 
| 36 36 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 37 | 
             
                requirements:
         | 
| 38 38 | 
             
                - - ">="
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            -
                    version: 0.3. | 
| 40 | 
            +
                    version: 0.3.8
         | 
| 41 41 | 
             
            description: Debugging functionality for Ruby. This is completely rewritten debug.rb
         | 
| 42 42 | 
             
              which was contained by the ancient Ruby versions.
         | 
| 43 43 | 
             
            email:
         | 
| @@ -66,7 +66,9 @@ files: | |
| 66 66 | 
             
            - lib/debug/color.rb
         | 
| 67 67 | 
             
            - lib/debug/config.rb
         | 
| 68 68 | 
             
            - lib/debug/console.rb
         | 
| 69 | 
            +
            - lib/debug/dap_custom/traceInspector.rb
         | 
| 69 70 | 
             
            - lib/debug/frame_info.rb
         | 
| 71 | 
            +
            - lib/debug/irb_integration.rb
         | 
| 70 72 | 
             
            - lib/debug/local.rb
         | 
| 71 73 | 
             
            - lib/debug/open.rb
         | 
| 72 74 | 
             
            - lib/debug/open_nonstop.rb
         | 
| @@ -96,14 +98,14 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 96 98 | 
             
              requirements:
         | 
| 97 99 | 
             
              - - ">="
         | 
| 98 100 | 
             
                - !ruby/object:Gem::Version
         | 
| 99 | 
            -
                  version: 2. | 
| 101 | 
            +
                  version: 2.7.0
         | 
| 100 102 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 101 103 | 
             
              requirements:
         | 
| 102 104 | 
             
              - - ">="
         | 
| 103 105 | 
             
                - !ruby/object:Gem::Version
         | 
| 104 106 | 
             
                  version: '0'
         | 
| 105 107 | 
             
            requirements: []
         | 
| 106 | 
            -
            rubygems_version: 3. | 
| 108 | 
            +
            rubygems_version: 3.5.0.dev
         | 
| 107 109 | 
             
            signing_key: 
         | 
| 108 110 | 
             
            specification_version: 4
         | 
| 109 111 | 
             
            summary: Debugging functionality for Ruby
         |