Sha256: 6370d3f6258f3b2a1f159e6d138350b269bae486c6861e1e01ead66fde84e00e

Contents?: true

Size: 576 Bytes

Versions: 2

Compression:

Stored size: 576 Bytes

Contents

module Byebug::DAP
  class Command::SetExceptionBreakpoints < Command
    # "The request configures the debuggers response to thrown exceptions.
    # "If an exception is configured to break, a ‘stopped’ event is fired (with reason ‘exception’).

    FILTERS = [
      {
        filter: 'all',
        label: 'Exceptions',
      },
    ]

    register!

    def execute
      Byebug.catchpoints.clear

      args.filters.each do |f|
        case f
        when 'all'
          Byebug.add_catchpoint('Exception')
        end
      end

      respond!
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
byebug-dap-0.1.4 lib/byebug/dap/commands/set_exception_breakpoints.rb
byebug-dap-0.1.3 lib/byebug/dap/commands/set_exception_breakpoints.rb