Class: Byebug::DAP::Command::SetExceptionBreakpoints

Inherits:
Byebug::DAP::Command show all
Defined in:
lib/byebug/dap/commands/set_exception_breakpoints.rb

Constant Summary collapse

FILTERS =

“The request configures the debuggers response to thrown exceptions. ”If an exception is configured to break, a ‘stopped’ event is fired (with reason ‘exception’).

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

Constants inherited from Byebug::DAP::Command

EVAL_ERROR

Instance Method Summary collapse

Methods inherited from Byebug::DAP::Command

command, execute, #execute_on_thread, #initialize, #log, register!, resolve!, #safe_execute, #started!, #stopped!

Methods included from SafeHelpers

#safe

Constructor Details

This class inherits a constructor from Byebug::DAP::Command

Instance Method Details

#executeObject



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/byebug/dap/commands/set_exception_breakpoints.rb', line 15

def execute
  Byebug.catchpoints.clear

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

  respond!
end