Git Product home page Git Product logo

byebug's Introduction

Byebug

Ver Gpa Dep Cov Git

Debugging in Ruby 2

Byebug is a simple to use, feature rich debugger for Ruby 2. It uses the new TracePoint API for execution control and the new Debug Inspector API for call stack navigation, so it doesn't depend on internal core sources. It's developed as a C extension, so it's fast. And it has a full test suite so it's reliable.

It allows you to see what is going on inside a Ruby program while it executes and offers many of the traditional debugging features such as:

  • Stepping: Running your program one line at a time.
  • Breaking: Pausing the program at some event or specified instruction, to examine the current state.
  • Evaluating: Basic REPL functionality, although pry does a better job at that.
  • Tracking: Keeping track of the different values of your variables or the different lines executed by your program.

Build Status

Linux & OSX Tra

Windows Vey

Requirements

  • Required: MRI 2.0.0 or higher. For debugging ruby 1.9.3 or older, use debugger.

  • Recommended:

    • MRI 2.0.0-p576 or higher.
    • MRI 2.1.3 or higher.
    • MRI 2.2.1 or higher.

Install

$ gem install byebug

Usage

Simply drop

byebug

wherever you want to start debugging and the execution will stop there. If you are debugging rails, start the server and once the execution gets to your byebug command you will get a debugging prompt.

Byebug's commands

Command     | Aliases      | Subcommands
----------- |:------------ |:-----------
`backtrace` | `bt` `where` |
`break`     |              |
`catch`     |              |
`condition` |              |
`continue`  |              |
`delete`    |              |
`disable`   |              | `breakpoints` `display`
`display`   |              |
`down`      |              |
`edit`      |              |
`enable`    |              | `breakpoints` `display`
`finish`    |              |
`frame`     |              |
`help`      |              |
`history`   |              |
`info`      |              | `args` `breakpoints` `catch` `display` `file` `line` `program`
`irb`       |              |
`kill`      |              |
`list`      |              |
`method`    |              | `instance`
`next`      |              |
`pry`       |              |
`ps`        |              |
`quit`      | `exit`       |
`restart`   |              |
`save`      |              |
`set`       |              | `autoirb` `autolist` `autosave` `basename` `callstyle` `fullpath` `histfile` `histsize` `linetrace` `listsize` `post_mortem` `savefile` `stack_on_error` `width`
`show`      |              | `autoirb` `autolist` `autosave` `basename` `callstyle` `fullpath` `histfile` `histsize` `linetrace` `listsize` `post_mortem` `savefile` `stack_on_error` `width`
`source`    |              |
`step`      |              |
`thread`    |              | `current` `list` `resume` `stop` `switch`
`tracevar`  |              |
`undisplay` |              |
`up`        |              |
`var`       |              | `all` `constant` `global` `instance` `local`

Semantic Versioning

Byebug tries to follow semantic versioning and tries to bump major version only when backwards incompatible changes are released. Backwards compatibility is targeted to pry-byebug and any other plugins relying on byebug.

Getting Started

Read byebug's markdown guide to get started. Proper documentation will be eventually written.

Related projects

Contribute

See Getting Started with Development.

Credits

Everybody who has ever contributed to this forked and reforked piece of software, specially:

  • @ko1, author of the awesome TracePoint API for Ruby.
  • @cldwalker, debugger's mantainer.
  • @denofevil, author of debase, the starting point of this.
  • @kevjames3 for testing, bug reports and the interest in the project.
  • @FooBarWidget for working and helping with remote debugging.

byebug's People

Contributors

a-chernykh avatar abatko avatar amatsuda avatar ark6 avatar arthurnn avatar astashov avatar bitdeli-chef avatar chrismissal avatar eagletmt avatar emilebosch avatar eric-hu avatar foobarwidget avatar igorfrenkel avatar jm3 avatar jordoh avatar nobu avatar os97673 avatar rhapsodyv avatar shuky19 avatar wallace avatar wikimatze avatar x-yuri avatar zabolotnov87 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.