Project

General

Profile

Actions

Feature #5528

closed

OO API for tracing

Added by trans (Thomas Sawyer) about 13 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
[ruby-core:40569]

Description

It would be nice to see a better API for "set_trace_func" functionality.

I wrote a fairly simple library to do this some time ago called <a href="https://github.com/rubyworks/tracepoint>TracePoint. One of the significant advantages of TracePoint is that it allows for multiple traces to be defined without interfering others and they can even be given names to activate and deactivate them independently.

It would be nice to see something like this is Ruby 2.0, it would have the a number of advantages:

  • Object-oriented - a tracepoint is an object, not just an array of arguments.
  • Connescence - the tracepoint methods give tangible names to the properties that are traced.
  • More robust - currently one use of set_trace_func will clobber another.

And probably others beside.

Updated by Anonymous about 12 years ago

I think that so few people respond to this because they are not users of Tracepoint :-)

Updated by ko1 (Koichi Sasada) over 11 years ago

  • Category set to core
  • Status changed from Open to Closed
  • Assignee set to ko1 (Koichi Sasada)
  • Target version changed from 3.0 to 2.0.0

TracePoint was introduced.

Actions

Also available in: Atom PDF

Like0
Like0Like0