ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- PKPH]F‡äéé resume-i.rinu„[µü¤U:RDoc::AnyMethod[iI" resume:EFI"DEBUGGER__#resume;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]*÷;Ãööthread_list-i.rinu„[µü¤U:RDoc::AnyMethod[iI"thread_list:EFI"DEBUGGER__#thread_list;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I" (num);T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]—OÁÁ waiting-i.rinu„[µü¤U:RDoc::AnyMethod[iI" waiting:EFI"DEBUGGER__#waiting;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I")Returns the list of waiting threads.;To:RDoc::Markup::BlankLineo; ; [I"OWhen stepping through the traces of a function, thread gets suspended, to ;TI"be resumed later.;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]“ m context-i.rinu„[µü¤U:RDoc::AnyMethod[iI" context:EFI"DEBUGGER__#context;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"(thread=Thread.current);T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]VAÞö@@stdout%3d-i.rinu„[µü¤U:RDoc::AnyMethod[iI" stdout=:EFI"DEBUGGER__#stdout=;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"3Sets the IO used as stdout. Defaults to STDOUT;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"(s);T@FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]ÇÛ"…{{ display-i.rinu„[µü¤U:RDoc::AnyMethod[iI" display:EFI"DEBUGGER__#display;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"(Returns the display expression list;To:RDoc::Markup::BlankLineo; ; [I""See DEBUGGER__ for more usage;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]ß¡  debug_thread_info-i.rinu„[µü¤U:RDoc::AnyMethod[iI"debug_thread_info:EFI"!DEBUGGER__#debug_thread_info;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"(input, binding);T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]¹0××cdesc-DEBUGGER__.rinu„[µü¤U:RDoc::NormalClass[iI"DEBUGGER__:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[Do:RDoc::Markup::Paragraph;[I";This library provides debugging functionality to Ruby.;To:RDoc::Markup::BlankLineo; ;[I"HTo add a debugger to your code, start by requiring +debug+ in your ;TI" program:;T@o:RDoc::Markup::Verbatim;[ I"def say(word) ;TI" require 'debug' ;TI" puts word ;TI" end ;T: @format0o; ;[I"RThis will cause Ruby to interrupt execution and show a prompt when the +say+ ;TI"method is run.;T@o; ;[I"IOnce you're inside the prompt, you can start debugging your program.;T@o; ;[I"(rdb:1) p word ;TI" "hello" ;T; 0S:RDoc::Markup::Heading: leveli: textI"Getting help;T@o; ;[I"2You can get help at any time by pressing +h+.;T@o; ;[-I"(rdb:1) h ;TI"Debugger help v.-0.002b ;TI"Commands ;TI"+ b[reak] [file:|class:] ;TI"% b[reak] [class.] ;TI"B set breakpoint to some position ;TI"D wat[ch] set watchpoint to some expression ;TI"A cat[ch] (|off) set catchpoint to an exception ;TI"3 b[reak] list breakpoints ;TI"2 cat[ch] show catchpoint ;TI"A del[ete][ nnn] delete some or all breakpoints ;TI"N disp[lay] add expression into display expression list ;TI"S undisp[lay][ nnn] delete one particular or all display expressions ;TI"K c[ont] run until program ends or hit breakpoint ;TI"P s[tep][ nnn] step (into methods) one line or till line nnn ;TI"D n[ext][ nnn] go over one line or till line nnn ;TI"1 w[here] display frames ;TI"2 f[rame] alias for where ;TI"B l[ist][ (-|nn-mm)] list program, - lists backwards ;TI": nn-mm lists given lines ;TI"7 up[ nn] move to higher frame ;TI"6 down[ nn] move to lower frame ;TI"8 fin[ish] return to outer frame ;TI"C tr[ace] (on|off) set trace mode of current thread ;TI"@ tr[ace] (on|off) all set trace mode of all threads ;TI"5 q[uit] exit from debugger ;TI"8 v[ar] g[lobal] show global variables ;TI"7 v[ar] l[ocal] show local variables ;TI"D v[ar] i[nstance] show instance variables of object ;TI"; v[ar] c[onst] show constants of object ;TI"9 m[ethod] i[nstance] show methods of object ;TI"K m[ethod] show instance methods of class or module ;TI"3 th[read] l[ist] list all threads ;TI"6 th[read] c[ur[rent]] show current thread ;TI"? th[read] [sw[itch]] switch thread context to nnn ;TI"2 th[read] stop stop thread nnn ;TI"4 th[read] resume resume thread nnn ;TI"J p expression evaluate expression and print its value ;TI"2 h[elp] print this help ;TI"+ evaluate ;T; 0S; ;i;I" Usage;T@o; ;[I"IThe following is a list of common functionalities that the debugger ;TI"provides.;T@S; ;i;I"!Navigating through your code;T@o; ;[I"HIn general, a debugger is used to find bugs in your program, which ;TI"Joften means pausing execution and inspecting variables at some point ;TI" in time.;T@o; ;[I"Let's look at an example:;T@o; ;[ I"def my_method(foo) ;TI" require 'debug' ;TI"! foo = get_foo if foo.nil? ;TI" raise if foo.nil? ;TI" end ;T; 0o; ;[I"JWhen you run this program, the debugger will kick in just before the ;TI"+foo+ assignment.;T@o; ;[I"(rdb:1) p foo ;TI" nil ;T; 0o; ;[I"GIn this example, it'd be interesting to move to the next line and ;TI"Ginspect the value of +foo+ again. You can do that by pressing +n+:;T@o; ;[I"#(rdb:1) n # goes to next line ;TI"(rdb:1) p foo ;TI" nil ;T; 0o; ;[I"HYou now know that the original value of +foo+ was nil, and that it ;TI"+still was nil after calling +get_foo+.;T@o; ;[I"@Other useful commands for navigating through your code are:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+c+;T;[o; ;[I"ORuns the program until it either exists or encounters another breakpoint. ;TI"LYou usually press +c+ when you are finished debugging your program and ;TI""want to resume its execution.;To;;[I"+s+;T;[o; ;[I"OSteps into method definition. In the previous example, +s+ would take you ;TI"/inside the method definition of +get_foo+.;To;;[I"+r+;T;[o; ;[I"Restart the program.;To;;[I"+q+;T;[o; ;[I"Quit the program.;T@S; ;i;I"Inspecting variables;T@o; ;[I"QYou can use the debugger to easily inspect both local and global variables. ;TI"6We've seen how to inspect local variables before:;T@o; ;[I"(rdb:1) p my_arg ;TI"42 ;T; 0o; ;[I"FYou can also pretty print the result of variables or expressions:;T@o; ;[ I"A(rdb:1) pp %w{a very long long array containing many words} ;TI" ["a", ;TI" "very", ;TI" "long", ;TI" ... ;TI"] ;T; 0o; ;[I"1You can list all local variables with +v l+:;T@o; ;[I"(rdb:1) v l ;TI" foo => "hello" ;T; 0o; ;[I"=Similarly, you can show all global variables with +v g+:;T@o; ;[I"(rdb:1) v g ;TI" all global variables ;T; 0o; ;[I"LFinally, you can omit +p+ if you simply want to evaluate a variable or ;TI"expression;T@o; ;[I"(rdb:1) 5**2 ;TI"25 ;T; 0S; ;i;I"Going beyond basics;T@o; ;[I"FRuby Debug provides more advanced functionalities like switching ;TI"Kbetween threads, setting breakpoints and watch expressions, and more. ;TI"HThe full list of commands is available at any time by pressing +h+.;T@S; ;i;I"Staying out of trouble;T@o; ;[I"EMake sure you remove every instance of +require 'debug'+ before ;TI"Eshipping your code. Failing to do so may result in your program ;TI"hanging unpredictably.;T@o; ;[I")Debug is not available in safe mode.;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[;[[I"break_points;FI"lib/debug.rb;T[I" context;F@ñ[I"debug_thread_info;F@ñ[I" display;F@ñ[I"get_thread;F@ñ[I"interrupt;F@ñ[I"make_thread_list;F@ñ[I" resume;F@ñ[I"set_last_thread;F@ñ[I"set_trace;F@ñ[I" stdout;F@ñ[I" stdout=;F@ñ[I" suspend;F@ñ[I"thread_list;F@ñ[I"thread_list_all;F@ñ[I" waiting;F@ñ[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[@Ü@ÜcRDoc::TopLevelPKPH] Ð>ïïinterrupt-i.rinu„[µü¤U:RDoc::AnyMethod[iI"interrupt:EFI"DEBUGGER__#interrupt;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]qyâôôset_trace-i.rinu„[µü¤U:RDoc::AnyMethod[iI"set_trace:EFI"DEBUGGER__#set_trace;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I" ( arg );T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]«­Ÿûûthread_list_all-i.rinu„[µü¤U:RDoc::AnyMethod[iI"thread_list_all:EFI"DEBUGGER__#thread_list_all;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]˜‹/ kkThread/cdesc-Thread.rinu„[µü¤U:RDoc::NormalModule[iI" Thread:EFI"DEBUGGER__::Thread;T0o:RDoc::Markup::Document: @parts[: @file0:0@omit_headings_from_table_of_contents_below0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/debug.rb;TI"DEBUGGER__;TcRDoc::NormalClassPKPH]¸(ðôôget_thread-i.rinu„[µü¤U:RDoc::AnyMethod[iI"get_thread:EFI"DEBUGGER__#get_thread;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I" (num);T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]è6°’ýýset_last_thread-i.rinu„[µü¤U:RDoc::AnyMethod[iI"set_last_thread:EFI"DEBUGGER__#set_last_thread;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I" (th);T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]U°)Yýýmake_thread_list-i.rinu„[µü¤U:RDoc::AnyMethod[iI"make_thread_list:EFI" DEBUGGER__#make_thread_list;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]/±nëë suspend-i.rinu„[µü¤U:RDoc::AnyMethod[iI" suspend:EFI"DEBUGGER__#suspend;TF: publico:RDoc::Markup::Document: @parts[: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]ˆša££break_points-i.rinu„[µü¤U:RDoc::AnyMethod[iI"break_points:EFI"DEBUGGER__#break_points;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the list of break points where execution will be stopped.;To:RDoc::Markup::BlankLineo; ; [I""See DEBUGGER__ for more usage;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]½%sw@@ stdout-i.rinu„[µü¤U:RDoc::AnyMethod[iI" stdout:EFI"DEBUGGER__#stdout;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"6Returns the IO used as stdout. Defaults to STDOUT;T: @fileI"lib/debug.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"DEBUGGER__;TcRDoc::NormalClass00PKPH]F‡äéé resume-i.rinu„[µü¤PKPH]*÷;Ãöö$thread_list-i.rinu„[µü¤PKPH]—OÁÁ Zwaiting-i.rinu„[µü¤PKPH]“ m Wcontext-i.rinu„[µü¤PKPH]VAÞö@@“stdout%3d-i.rinu„[µü¤PKPH]ÇÛ"…{{ display-i.rinu„[µü¤PKPH]ß¡  Èdebug_thread_info-i.rinu„[µü¤PKPH]¹0×× cdesc-DEBUGGER__.rinu„[µü¤PKPH] Ð>ïï5%interrupt-i.rinu„[µü¤PKPH]qyâôôb&set_trace-i.rinu„[µü¤PKPH]«­Ÿûû”'thread_list_all-i.rinu„[µü¤PKPH]˜‹/ kkÓ(Thread/cdesc-Thread.rinu„[µü¤PKPH]¸(ðôô„*get_thread-i.rinu„[µü¤PKPH]è6°’ýý·+set_last_thread-i.rinu„[µü¤PKPH]U°)Yýýø,make_thread_list-i.rinu„[µü¤PKPH]/±nëë :.suspend-i.rinu„[µü¤PKPH]ˆša££a/break_points-i.rinu„[µü¤PKPH]½%sw@@ E1stdout-i.rinu„[µü¤PKœÀ2