D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
TracePoint
/
Filename :
cdesc-TracePoint.ri
back
Copy
U:RDoc::NormalClass[iI"TracePoint:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"KA class that provides the functionality of Kernel#set_trace_func in a ;TI")well-structured Object-Oriented API.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading: leveli: textI"Example;T@o; ;[I"FUse TracePoint to gather information specifically for exceptions:;T@o:RDoc::Markup::Verbatim;[I",trace = TracePoint.new(:raise) do |tp| ;TI"4 p [tp.lineno, tp.event, tp.raised_exception] ;TI" end ;TI" #=> #<TracePoint:disabled> ;TI" ;TI"trace.enable #=> false ;TI" ;TI"0 / 0 ;TI"9#=> [5, :raise, #<ZeroDivisionError: divided by 0>] ;T:@format0S;;i; I"Events;T@o; ;[I"FIf you don't specify the types of events you want to listen for, ;TI"2TracePoint will include all available events.;T@o; ;[I"P*Note:* Do not depend on the current event set, as this list is subject to ;TI"Kchange. Instead, it is recommended to specify the types of events you ;TI"want to use.;T@o; ;[I"MTo filter what is traced, you can pass any of the following as +events+:;T@o:RDoc::Markup::List: @type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I"+:line+;T;[o; ;[I"6Execute an expression or statement on a new line.;To;;[I" +:class+;T;[o; ;[I"(Start a class or module definition.;To;;[I"+:end+;T;[o; ;[I")Finish a class or module definition.;To;;[I"+:call+;T;[o; ;[I"Call a Ruby method.;To;;[I"+:return+;T;[o; ;[I"Return from a Ruby method.;To;;[I"+:c_call+;T;[o; ;[I"Call a C-language routine.;To;;[I"+:c_return+;T;[o; ;[I"&Return from a C-language routine.;To;;[I" +:raise+;T;[o; ;[I"Raise an exception.;To;;[I"+:rescue+;T;[o; ;[I"Rescue an exception.;To;;[I"+:b_call+;T;[o; ;[I"Event hook at block entry.;To;;[I"+:b_return+;T;[o; ;[I" Event hook at block ending.;To;;[I"+:a_call+;T;[o; ;[I">Event hook at all calls (+call+, +b_call+, and +c_call+).;To;;[I"+:a_return+;T;[o; ;[I"FEvent hook at all returns (+return+, +b_return+, and +c_return+).;To;;[I"+:thread_begin+;T;[o; ;[I"$Event hook at thread beginning.;To;;[I"+:thread_end+;T;[o; ;[I"!Event hook at thread ending.;To;;[I"+:fiber_switch+;T;[o; ;[I" Event hook at fiber switch.;To;;[I"+:script_compiled+;T;[o; ;[I"@New Ruby code compiled (with +eval+, +load+, or +require+).;T: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ ;I"vm_trace.c;T;0;0;0[ [ [ [[I" class;T[[:public[ [I"allow_reentry;TI"trace_point.rb;T[I"new;T@�[I" stat;T@�[I" trace;T@�[:protected[ [:private[ [I" instance;T[[;[[I"binding;T@�[I"callee_id;T@�[I"defined_class;T@�[I"disable;T@�[I"enable;T@�[I" enabled?;T@�[I"eval_script;T@�[I" event;T@�[I"inspect;T@�[I"instruction_sequence;T@�[I"lineno;T@�[I"method_id;T@�[I"parameters;T@�[I" path;T@�[I"raised_exception;T@�[I"return_value;T@�[I" self;T@�[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@�@�@�cRDoc::TopLevel