Code Monkey home page Code Monkey logo

backtracer's People

Contributors

rdp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

backtracer's Issues

don't setup script lines!

irb(main):003:0> Object.constants.grep /SCRIPT/i
=> [:ScriptError, :RUBY_DESCRIPTION]
irb(main):004:0> require 'backtracer'
=> true
irb(main):005:0> Object.constants.grep /SCRIPT/i
=> [:ScriptError, :RUBY_DESCRIPTION, :SCRIPT_LINES__]

YAML

I like what you're doing here. Always thought the backtrace could be made more useful. It occurs to me that it can be hard to decide what exactly one should show in a backtrace, you never know what the developer wants to see, and providing everything can be an overload. That led to to think it would be cool if the backtrace did provide everything, but in YAML, and then we could pipe that to a filter command to see it in different ways, even write our own filters. We might have somthing like:

ruby -rbacktracer myscript.rb 2>&1 | backtracer -i locals

wants a "code in context" backtrace too

/home/rdp/prod/allgems_prod_copy/lib/allgems/App.rb in load_gem_spec
haml :load, :layout => false
end

    private

    def load_gem_spec(gem, version=nil)
        version ||= get_latest(gem)
        raise 'failed gem' unless version
        Specer.get_spec(gem, version)
    end

    # gem:: name of the gem
    # Returns the latest version of the given gem or nil
    def get_latest(gem)
        AllGems.db[:versions].join(:gems, :id => :gem_id

warning

E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/backtracer-0.7.2/lib/backtracer.rb:32: warning: global variable `$no_code_line_numbers' not initialized

this

C:/installs/ruby19_mingw/lib/ruby/gems/1.9.1/gems/backtracer-0.6.1/lib/backtracer.rb:32:in `block in ': undefined method`set_backtrace' for nil:NilClass (NoMethodError)
C:/installs/ruby19_mingw/lib/ruby/site_ruby/1.9.1/rubygems.rb:827:in `report_activate_error': Could not find RubyGem whichr (>= 0) (Gem::LoadError)
        from C:/installs/ruby19_mingw/lib/ruby/site_ruby/1.9.1/rubygems.rb:261:in`activate'
        from C:/installs/ruby19_mingw/lib/ruby/site_ruby/1.9.1/rubygems.rb:68:in `gem'
        from :273:in`push_gem_version_on_load_path'
        from internal:gem_prelude:14:in `gem'
        from c:/cygwin/bin/whichr:18:in`'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.