lib/byebug/commands/set.rb in byebug-2.1.1 vs lib/byebug/commands/set.rb in byebug-2.2.0
- old
+ new
@@ -19,10 +19,12 @@
if setting_args[0] and ['short', 'long'].include?(setting_args[0])
Command.settings[:callstyle] = setting_args[0].to_sym
else
print "Invalid callstyle. Should be one of: \"short\" or \"long\"\n"
end
+ when /^verbose$/
+ Byebug.verbose = setting_value
when /^history$/
try_subcmd = setting_args[0]
subcmd = Command.find(SetCommand::SetHistorySubcommands, try_subcmd)
return print "Invalid history parameter #{try_subcmd}. Should be" \
' "filename", "save" or "size"' unless subcmd
@@ -47,15 +49,11 @@
Command.settings[:listsize] = listsize
when /^width$/
return unless width = get_int(setting_args[0], "Set width", 10, nil, 80)
Command.settings[:width] = width
when /^post_mortem$/
- if setting_value
- Byebug.post_mortem
- else
- Byebug.post_mortem = false
- end
+ Byebug.post_mortem = setting_value
when /^autoeval|autoreload|basename|forcestep|fullpath|linetrace_plus|
testing|stack_trace_on_error$/x
Command.settings[setting_name.to_sym] = setting_value
else
return print "Unknown setting #{@match[1]}.\n"
@@ -93,9 +91,11 @@
'Set line execution tracing to show different lines'],
['listsize', 3, false, 'Set number of source lines to list by default'],
['post_mortem', 2, true, 'Enable post-mortem mode'],
['stack_trace_on_error', 1, true,
'Display stack trace when "eval" raises exception'],
+ ['verbose', 1, true,
+ 'Enable verbose output of TracePoint API events is enabled'],
['width', 1, false,
'Number of characters per line for byebug\'s output']
].map do |name, min, is_bool, short_help, long_help|
SubcmdStruct2.new(name, min, is_bool, short_help, long_help)
end unless defined?(Subcommands)