Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../proc/self/root/usr/share/ruby
File: debug.rb
# frozen_string_literal: true
[0] Fix | Delete
# Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
[1] Fix | Delete
# Copyright (C) 2000 Information-technology Promotion Agency, Japan
[2] Fix | Delete
# Copyright (C) 2000-2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
[3] Fix | Delete
[4] Fix | Delete
require 'continuation'
[5] Fix | Delete
[6] Fix | Delete
if $SAFE > 0
[7] Fix | Delete
STDERR.print "-r debug.rb is not available in safe mode\n"
[8] Fix | Delete
exit 1
[9] Fix | Delete
end
[10] Fix | Delete
[11] Fix | Delete
require 'tracer'
[12] Fix | Delete
require 'pp'
[13] Fix | Delete
[14] Fix | Delete
class Tracer # :nodoc:
[15] Fix | Delete
def Tracer.trace_func(*vars)
[16] Fix | Delete
Single.trace_func(*vars)
[17] Fix | Delete
end
[18] Fix | Delete
end
[19] Fix | Delete
[20] Fix | Delete
SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__ # :nodoc:
[21] Fix | Delete
[22] Fix | Delete
##
[23] Fix | Delete
# This library provides debugging functionality to Ruby.
[24] Fix | Delete
#
[25] Fix | Delete
# To add a debugger to your code, start by requiring +debug+ in your
[26] Fix | Delete
# program:
[27] Fix | Delete
#
[28] Fix | Delete
# def say(word)
[29] Fix | Delete
# require 'debug'
[30] Fix | Delete
# puts word
[31] Fix | Delete
# end
[32] Fix | Delete
#
[33] Fix | Delete
# This will cause Ruby to interrupt execution and show a prompt when the +say+
[34] Fix | Delete
# method is run.
[35] Fix | Delete
#
[36] Fix | Delete
# Once you're inside the prompt, you can start debugging your program.
[37] Fix | Delete
#
[38] Fix | Delete
# (rdb:1) p word
[39] Fix | Delete
# "hello"
[40] Fix | Delete
#
[41] Fix | Delete
# == Getting help
[42] Fix | Delete
#
[43] Fix | Delete
# You can get help at any time by pressing +h+.
[44] Fix | Delete
#
[45] Fix | Delete
# (rdb:1) h
[46] Fix | Delete
# Debugger help v.-0.002b
[47] Fix | Delete
# Commands
[48] Fix | Delete
# b[reak] [file:|class:]<line|method>
[49] Fix | Delete
# b[reak] [class.]<line|method>
[50] Fix | Delete
# set breakpoint to some position
[51] Fix | Delete
# wat[ch] <expression> set watchpoint to some expression
[52] Fix | Delete
# cat[ch] (<exception>|off) set catchpoint to an exception
[53] Fix | Delete
# b[reak] list breakpoints
[54] Fix | Delete
# cat[ch] show catchpoint
[55] Fix | Delete
# del[ete][ nnn] delete some or all breakpoints
[56] Fix | Delete
# disp[lay] <expression> add expression into display expression list
[57] Fix | Delete
# undisp[lay][ nnn] delete one particular or all display expressions
[58] Fix | Delete
# c[ont] run until program ends or hit breakpoint
[59] Fix | Delete
# s[tep][ nnn] step (into methods) one line or till line nnn
[60] Fix | Delete
# n[ext][ nnn] go over one line or till line nnn
[61] Fix | Delete
# w[here] display frames
[62] Fix | Delete
# f[rame] alias for where
[63] Fix | Delete
# l[ist][ (-|nn-mm)] list program, - lists backwards
[64] Fix | Delete
# nn-mm lists given lines
[65] Fix | Delete
# up[ nn] move to higher frame
[66] Fix | Delete
# down[ nn] move to lower frame
[67] Fix | Delete
# fin[ish] return to outer frame
[68] Fix | Delete
# tr[ace] (on|off) set trace mode of current thread
[69] Fix | Delete
# tr[ace] (on|off) all set trace mode of all threads
[70] Fix | Delete
# q[uit] exit from debugger
[71] Fix | Delete
# v[ar] g[lobal] show global variables
[72] Fix | Delete
# v[ar] l[ocal] show local variables
[73] Fix | Delete
# v[ar] i[nstance] <object> show instance variables of object
[74] Fix | Delete
# v[ar] c[onst] <object> show constants of object
[75] Fix | Delete
# m[ethod] i[nstance] <obj> show methods of object
[76] Fix | Delete
# m[ethod] <class|module> show instance methods of class or module
[77] Fix | Delete
# th[read] l[ist] list all threads
[78] Fix | Delete
# th[read] c[ur[rent]] show current thread
[79] Fix | Delete
# th[read] [sw[itch]] <nnn> switch thread context to nnn
[80] Fix | Delete
# th[read] stop <nnn> stop thread nnn
[81] Fix | Delete
# th[read] resume <nnn> resume thread nnn
[82] Fix | Delete
# p expression evaluate expression and print its value
[83] Fix | Delete
# h[elp] print this help
[84] Fix | Delete
# <everything else> evaluate
[85] Fix | Delete
#
[86] Fix | Delete
# == Usage
[87] Fix | Delete
#
[88] Fix | Delete
# The following is a list of common functionalities that the debugger
[89] Fix | Delete
# provides.
[90] Fix | Delete
#
[91] Fix | Delete
# === Navigating through your code
[92] Fix | Delete
#
[93] Fix | Delete
# In general, a debugger is used to find bugs in your program, which
[94] Fix | Delete
# often means pausing execution and inspecting variables at some point
[95] Fix | Delete
# in time.
[96] Fix | Delete
#
[97] Fix | Delete
# Let's look at an example:
[98] Fix | Delete
#
[99] Fix | Delete
# def my_method(foo)
[100] Fix | Delete
# require 'debug'
[101] Fix | Delete
# foo = get_foo if foo.nil?
[102] Fix | Delete
# raise if foo.nil?
[103] Fix | Delete
# end
[104] Fix | Delete
#
[105] Fix | Delete
# When you run this program, the debugger will kick in just before the
[106] Fix | Delete
# +foo+ assignment.
[107] Fix | Delete
#
[108] Fix | Delete
# (rdb:1) p foo
[109] Fix | Delete
# nil
[110] Fix | Delete
#
[111] Fix | Delete
# In this example, it'd be interesting to move to the next line and
[112] Fix | Delete
# inspect the value of +foo+ again. You can do that by pressing +n+:
[113] Fix | Delete
#
[114] Fix | Delete
# (rdb:1) n # goes to next line
[115] Fix | Delete
# (rdb:1) p foo
[116] Fix | Delete
# nil
[117] Fix | Delete
#
[118] Fix | Delete
# You now know that the original value of +foo+ was nil, and that it
[119] Fix | Delete
# still was nil after calling +get_foo+.
[120] Fix | Delete
#
[121] Fix | Delete
# Other useful commands for navigating through your code are:
[122] Fix | Delete
#
[123] Fix | Delete
# +c+::
[124] Fix | Delete
# Runs the program until it either exists or encounters another breakpoint.
[125] Fix | Delete
# You usually press +c+ when you are finished debugging your program and
[126] Fix | Delete
# want to resume its execution.
[127] Fix | Delete
# +s+::
[128] Fix | Delete
# Steps into method definition. In the previous example, +s+ would take you
[129] Fix | Delete
# inside the method definition of +get_foo+.
[130] Fix | Delete
# +r+::
[131] Fix | Delete
# Restart the program.
[132] Fix | Delete
# +q+::
[133] Fix | Delete
# Quit the program.
[134] Fix | Delete
#
[135] Fix | Delete
# === Inspecting variables
[136] Fix | Delete
#
[137] Fix | Delete
# You can use the debugger to easily inspect both local and global variables.
[138] Fix | Delete
# We've seen how to inspect local variables before:
[139] Fix | Delete
#
[140] Fix | Delete
# (rdb:1) p my_arg
[141] Fix | Delete
# 42
[142] Fix | Delete
#
[143] Fix | Delete
# You can also pretty print the result of variables or expressions:
[144] Fix | Delete
#
[145] Fix | Delete
# (rdb:1) pp %w{a very long long array containing many words}
[146] Fix | Delete
# ["a",
[147] Fix | Delete
# "very",
[148] Fix | Delete
# "long",
[149] Fix | Delete
# ...
[150] Fix | Delete
# ]
[151] Fix | Delete
#
[152] Fix | Delete
# You can list all local variables with +v l+:
[153] Fix | Delete
#
[154] Fix | Delete
# (rdb:1) v l
[155] Fix | Delete
# foo => "hello"
[156] Fix | Delete
#
[157] Fix | Delete
# Similarly, you can show all global variables with +v g+:
[158] Fix | Delete
#
[159] Fix | Delete
# (rdb:1) v g
[160] Fix | Delete
# all global variables
[161] Fix | Delete
#
[162] Fix | Delete
# Finally, you can omit +p+ if you simply want to evaluate a variable or
[163] Fix | Delete
# expression
[164] Fix | Delete
#
[165] Fix | Delete
# (rdb:1) 5**2
[166] Fix | Delete
# 25
[167] Fix | Delete
#
[168] Fix | Delete
# === Going beyond basics
[169] Fix | Delete
#
[170] Fix | Delete
# Ruby Debug provides more advanced functionalities like switching
[171] Fix | Delete
# between threads, setting breakpoints and watch expressions, and more.
[172] Fix | Delete
# The full list of commands is available at any time by pressing +h+.
[173] Fix | Delete
#
[174] Fix | Delete
# == Staying out of trouble
[175] Fix | Delete
#
[176] Fix | Delete
# Make sure you remove every instance of +require 'debug'+ before
[177] Fix | Delete
# shipping your code. Failing to do so may result in your program
[178] Fix | Delete
# hanging unpredictably.
[179] Fix | Delete
#
[180] Fix | Delete
# Debug is not available in safe mode.
[181] Fix | Delete
[182] Fix | Delete
class DEBUGGER__
[183] Fix | Delete
MUTEX = Thread::Mutex.new # :nodoc:
[184] Fix | Delete
[185] Fix | Delete
class Context # :nodoc:
[186] Fix | Delete
DEBUG_LAST_CMD = []
[187] Fix | Delete
[188] Fix | Delete
begin
[189] Fix | Delete
require 'readline'
[190] Fix | Delete
def readline(prompt, hist)
[191] Fix | Delete
Readline::readline(prompt, hist)
[192] Fix | Delete
end
[193] Fix | Delete
rescue LoadError
[194] Fix | Delete
def readline(prompt, hist)
[195] Fix | Delete
STDOUT.print prompt
[196] Fix | Delete
STDOUT.flush
[197] Fix | Delete
line = STDIN.gets
[198] Fix | Delete
exit unless line
[199] Fix | Delete
line.chomp!
[200] Fix | Delete
line
[201] Fix | Delete
end
[202] Fix | Delete
USE_READLINE = false
[203] Fix | Delete
end
[204] Fix | Delete
[205] Fix | Delete
def initialize
[206] Fix | Delete
if Thread.current == Thread.main
[207] Fix | Delete
@stop_next = 1
[208] Fix | Delete
else
[209] Fix | Delete
@stop_next = 0
[210] Fix | Delete
end
[211] Fix | Delete
@last_file = nil
[212] Fix | Delete
@file = nil
[213] Fix | Delete
@line = nil
[214] Fix | Delete
@no_step = nil
[215] Fix | Delete
@frames = []
[216] Fix | Delete
@finish_pos = 0
[217] Fix | Delete
@trace = false
[218] Fix | Delete
@catch = "StandardError"
[219] Fix | Delete
@suspend_next = false
[220] Fix | Delete
end
[221] Fix | Delete
[222] Fix | Delete
def stop_next(n=1)
[223] Fix | Delete
@stop_next = n
[224] Fix | Delete
end
[225] Fix | Delete
[226] Fix | Delete
def set_suspend
[227] Fix | Delete
@suspend_next = true
[228] Fix | Delete
end
[229] Fix | Delete
[230] Fix | Delete
def clear_suspend
[231] Fix | Delete
@suspend_next = false
[232] Fix | Delete
end
[233] Fix | Delete
[234] Fix | Delete
def suspend_all
[235] Fix | Delete
DEBUGGER__.suspend
[236] Fix | Delete
end
[237] Fix | Delete
[238] Fix | Delete
def resume_all
[239] Fix | Delete
DEBUGGER__.resume
[240] Fix | Delete
end
[241] Fix | Delete
[242] Fix | Delete
def check_suspend
[243] Fix | Delete
while MUTEX.synchronize {
[244] Fix | Delete
if @suspend_next
[245] Fix | Delete
DEBUGGER__.waiting.push Thread.current
[246] Fix | Delete
@suspend_next = false
[247] Fix | Delete
true
[248] Fix | Delete
end
[249] Fix | Delete
}
[250] Fix | Delete
end
[251] Fix | Delete
end
[252] Fix | Delete
[253] Fix | Delete
def trace?
[254] Fix | Delete
@trace
[255] Fix | Delete
end
[256] Fix | Delete
[257] Fix | Delete
def set_trace(arg)
[258] Fix | Delete
@trace = arg
[259] Fix | Delete
end
[260] Fix | Delete
[261] Fix | Delete
def stdout
[262] Fix | Delete
DEBUGGER__.stdout
[263] Fix | Delete
end
[264] Fix | Delete
[265] Fix | Delete
def break_points
[266] Fix | Delete
DEBUGGER__.break_points
[267] Fix | Delete
end
[268] Fix | Delete
[269] Fix | Delete
def display
[270] Fix | Delete
DEBUGGER__.display
[271] Fix | Delete
end
[272] Fix | Delete
[273] Fix | Delete
def context(th)
[274] Fix | Delete
DEBUGGER__.context(th)
[275] Fix | Delete
end
[276] Fix | Delete
[277] Fix | Delete
def set_trace_all(arg)
[278] Fix | Delete
DEBUGGER__.set_trace(arg)
[279] Fix | Delete
end
[280] Fix | Delete
[281] Fix | Delete
def set_last_thread(th)
[282] Fix | Delete
DEBUGGER__.set_last_thread(th)
[283] Fix | Delete
end
[284] Fix | Delete
[285] Fix | Delete
def debug_eval(str, binding)
[286] Fix | Delete
begin
[287] Fix | Delete
eval(str, binding)
[288] Fix | Delete
rescue StandardError, ScriptError => e
[289] Fix | Delete
at = eval("caller(1)", binding)
[290] Fix | Delete
stdout.printf "%s:%s\n", at.shift, e.to_s.sub(/\(eval\):1:(in `.*?':)?/, '')
[291] Fix | Delete
for i in at
[292] Fix | Delete
stdout.printf "\tfrom %s\n", i
[293] Fix | Delete
end
[294] Fix | Delete
throw :debug_error
[295] Fix | Delete
end
[296] Fix | Delete
end
[297] Fix | Delete
[298] Fix | Delete
def debug_silent_eval(str, binding)
[299] Fix | Delete
begin
[300] Fix | Delete
eval(str, binding)
[301] Fix | Delete
rescue StandardError, ScriptError
[302] Fix | Delete
nil
[303] Fix | Delete
end
[304] Fix | Delete
end
[305] Fix | Delete
[306] Fix | Delete
def var_list(ary, binding)
[307] Fix | Delete
ary.sort!
[308] Fix | Delete
for v in ary
[309] Fix | Delete
stdout.printf " %s => %s\n", v, eval(v.to_s, binding).inspect
[310] Fix | Delete
end
[311] Fix | Delete
end
[312] Fix | Delete
[313] Fix | Delete
def debug_variable_info(input, binding)
[314] Fix | Delete
case input
[315] Fix | Delete
when /^\s*g(?:lobal)?\s*$/
[316] Fix | Delete
var_list(global_variables, binding)
[317] Fix | Delete
[318] Fix | Delete
when /^\s*l(?:ocal)?\s*$/
[319] Fix | Delete
var_list(eval("local_variables", binding), binding)
[320] Fix | Delete
[321] Fix | Delete
when /^\s*i(?:nstance)?\s+/
[322] Fix | Delete
obj = debug_eval($', binding)
[323] Fix | Delete
var_list(obj.instance_variables, obj.instance_eval{binding()})
[324] Fix | Delete
[325] Fix | Delete
when /^\s*c(?:onst(?:ant)?)?\s+/
[326] Fix | Delete
obj = debug_eval($', binding)
[327] Fix | Delete
unless obj.kind_of? Module
[328] Fix | Delete
stdout.print "Should be Class/Module: ", $', "\n"
[329] Fix | Delete
else
[330] Fix | Delete
var_list(obj.constants, obj.module_eval{binding()})
[331] Fix | Delete
end
[332] Fix | Delete
end
[333] Fix | Delete
end
[334] Fix | Delete
[335] Fix | Delete
def debug_method_info(input, binding)
[336] Fix | Delete
case input
[337] Fix | Delete
when /^i(:?nstance)?\s+/
[338] Fix | Delete
obj = debug_eval($', binding)
[339] Fix | Delete
[340] Fix | Delete
len = 0
[341] Fix | Delete
for v in obj.methods.sort
[342] Fix | Delete
len += v.size + 1
[343] Fix | Delete
if len > 70
[344] Fix | Delete
len = v.size + 1
[345] Fix | Delete
stdout.print "\n"
[346] Fix | Delete
end
[347] Fix | Delete
stdout.print v, " "
[348] Fix | Delete
end
[349] Fix | Delete
stdout.print "\n"
[350] Fix | Delete
[351] Fix | Delete
else
[352] Fix | Delete
obj = debug_eval(input, binding)
[353] Fix | Delete
unless obj.kind_of? Module
[354] Fix | Delete
stdout.print "Should be Class/Module: ", input, "\n"
[355] Fix | Delete
else
[356] Fix | Delete
len = 0
[357] Fix | Delete
for v in obj.instance_methods(false).sort
[358] Fix | Delete
len += v.size + 1
[359] Fix | Delete
if len > 70
[360] Fix | Delete
len = v.size + 1
[361] Fix | Delete
stdout.print "\n"
[362] Fix | Delete
end
[363] Fix | Delete
stdout.print v, " "
[364] Fix | Delete
end
[365] Fix | Delete
stdout.print "\n"
[366] Fix | Delete
end
[367] Fix | Delete
end
[368] Fix | Delete
end
[369] Fix | Delete
[370] Fix | Delete
def thnum
[371] Fix | Delete
num = DEBUGGER__.instance_eval{@thread_list[Thread.current]}
[372] Fix | Delete
unless num
[373] Fix | Delete
DEBUGGER__.make_thread_list
[374] Fix | Delete
num = DEBUGGER__.instance_eval{@thread_list[Thread.current]}
[375] Fix | Delete
end
[376] Fix | Delete
num
[377] Fix | Delete
end
[378] Fix | Delete
[379] Fix | Delete
def debug_command(file, line, id, binding)
[380] Fix | Delete
MUTEX.lock
[381] Fix | Delete
unless defined?($debugger_restart) and $debugger_restart
[382] Fix | Delete
callcc{|c| $debugger_restart = c}
[383] Fix | Delete
end
[384] Fix | Delete
set_last_thread(Thread.current)
[385] Fix | Delete
frame_pos = 0
[386] Fix | Delete
binding_file = file
[387] Fix | Delete
binding_line = line
[388] Fix | Delete
previous_line = nil
[389] Fix | Delete
if ENV['EMACS']
[390] Fix | Delete
stdout.printf "\032\032%s:%d:\n", binding_file, binding_line
[391] Fix | Delete
else
[392] Fix | Delete
stdout.printf "%s:%d:%s", binding_file, binding_line,
[393] Fix | Delete
line_at(binding_file, binding_line)
[394] Fix | Delete
end
[395] Fix | Delete
@frames[0] = [binding, file, line, id]
[396] Fix | Delete
display_expressions(binding)
[397] Fix | Delete
prompt = true
[398] Fix | Delete
while prompt and input = readline("(rdb:%d) "%thnum(), true)
[399] Fix | Delete
catch(:debug_error) do
[400] Fix | Delete
if input == ""
[401] Fix | Delete
next unless DEBUG_LAST_CMD[0]
[402] Fix | Delete
input = DEBUG_LAST_CMD[0]
[403] Fix | Delete
stdout.print input, "\n"
[404] Fix | Delete
else
[405] Fix | Delete
DEBUG_LAST_CMD[0] = input
[406] Fix | Delete
end
[407] Fix | Delete
[408] Fix | Delete
case input
[409] Fix | Delete
when /^\s*tr(?:ace)?(?:\s+(on|off))?(?:\s+(all))?$/
[410] Fix | Delete
if defined?( $2 )
[411] Fix | Delete
if $1 == 'on'
[412] Fix | Delete
set_trace_all true
[413] Fix | Delete
else
[414] Fix | Delete
set_trace_all false
[415] Fix | Delete
end
[416] Fix | Delete
elsif defined?( $1 )
[417] Fix | Delete
if $1 == 'on'
[418] Fix | Delete
set_trace true
[419] Fix | Delete
else
[420] Fix | Delete
set_trace false
[421] Fix | Delete
end
[422] Fix | Delete
end
[423] Fix | Delete
if trace?
[424] Fix | Delete
stdout.print "Trace on.\n"
[425] Fix | Delete
else
[426] Fix | Delete
stdout.print "Trace off.\n"
[427] Fix | Delete
end
[428] Fix | Delete
[429] Fix | Delete
when /^\s*b(?:reak)?\s+(?:(.+):)?([^.:]+)$/
[430] Fix | Delete
pos = $2
[431] Fix | Delete
if $1
[432] Fix | Delete
klass = debug_silent_eval($1, binding)
[433] Fix | Delete
file = $1
[434] Fix | Delete
end
[435] Fix | Delete
if pos =~ /^\d+$/
[436] Fix | Delete
pname = pos
[437] Fix | Delete
pos = pos.to_i
[438] Fix | Delete
else
[439] Fix | Delete
pname = pos = pos.intern.id2name
[440] Fix | Delete
end
[441] Fix | Delete
break_points.push [true, 0, klass || file, pos]
[442] Fix | Delete
stdout.printf "Set breakpoint %d at %s:%s\n", break_points.size, klass || file, pname
[443] Fix | Delete
[444] Fix | Delete
when /^\s*b(?:reak)?\s+(.+)[#.]([^.:]+)$/
[445] Fix | Delete
pos = $2.intern.id2name
[446] Fix | Delete
klass = debug_eval($1, binding)
[447] Fix | Delete
break_points.push [true, 0, klass, pos]
[448] Fix | Delete
stdout.printf "Set breakpoint %d at %s.%s\n", break_points.size, klass, pos
[449] Fix | Delete
[450] Fix | Delete
when /^\s*wat(?:ch)?\s+(.+)$/
[451] Fix | Delete
exp = $1
[452] Fix | Delete
break_points.push [true, 1, exp]
[453] Fix | Delete
stdout.printf "Set watchpoint %d:%s\n", break_points.size, exp
[454] Fix | Delete
[455] Fix | Delete
when /^\s*b(?:reak)?$/
[456] Fix | Delete
if break_points.find{|b| b[1] == 0}
[457] Fix | Delete
n = 1
[458] Fix | Delete
stdout.print "Breakpoints:\n"
[459] Fix | Delete
break_points.each do |b|
[460] Fix | Delete
if b[0] and b[1] == 0
[461] Fix | Delete
stdout.printf " %d %s:%s\n", n, b[2], b[3]
[462] Fix | Delete
end
[463] Fix | Delete
n += 1
[464] Fix | Delete
end
[465] Fix | Delete
end
[466] Fix | Delete
if break_points.find{|b| b[1] == 1}
[467] Fix | Delete
n = 1
[468] Fix | Delete
stdout.print "\n"
[469] Fix | Delete
stdout.print "Watchpoints:\n"
[470] Fix | Delete
for b in break_points
[471] Fix | Delete
if b[0] and b[1] == 1
[472] Fix | Delete
stdout.printf " %d %s\n", n, b[2]
[473] Fix | Delete
end
[474] Fix | Delete
n += 1
[475] Fix | Delete
end
[476] Fix | Delete
end
[477] Fix | Delete
if break_points.size == 0
[478] Fix | Delete
stdout.print "No breakpoints\n"
[479] Fix | Delete
else
[480] Fix | Delete
stdout.print "\n"
[481] Fix | Delete
end
[482] Fix | Delete
[483] Fix | Delete
when /^\s*del(?:ete)?(?:\s+(\d+))?$/
[484] Fix | Delete
pos = $1
[485] Fix | Delete
unless pos
[486] Fix | Delete
input = readline("Clear all breakpoints? (y/n) ", false)
[487] Fix | Delete
if input == "y"
[488] Fix | Delete
for b in break_points
[489] Fix | Delete
b[0] = false
[490] Fix | Delete
end
[491] Fix | Delete
end
[492] Fix | Delete
else
[493] Fix | Delete
pos = pos.to_i
[494] Fix | Delete
if break_points[pos-1]
[495] Fix | Delete
break_points[pos-1][0] = false
[496] Fix | Delete
else
[497] Fix | Delete
stdout.printf "Breakpoint %d is not defined\n", pos
[498] Fix | Delete
end
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function