Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Easy debug with Pow. It supports ruby-debug, debugger (ruby-debug19 fork) and pry.
Ruby
branch: master
Failed to load latest commit information.
bin
lib
.gitignore
Gemfile Hello cruel world!
LICENSE
README.md
Rakefile
pow-debug.gemspec

README.md

pow-debug gem

Installation

pow-debug gem

pow-debug avaliable as gem, so you just need to put gem 'pow-debug' into your Gemfile.

Debug tools

pow-debug supports few debug tools:

  • pry-remote (Pry is a powerful alternative to the standard IRB shell for Ruby);
  • debugger (port of ruby-debug that works on 1.9.2 and 1.9.3);
  • and classy ruby-debug.

So you need to choose one (or even few) and add it to Gemfile too:

group :development, :test do
  # If you want to use `pry-remote`
  gem 'pry-remote'

  # If you want to use rdebug with Ruby >= 1.9.2
  gem 'debugger'

  # Or standart ruby-debug gem
  gem 'ruby-debug'

  # And finally:
  gem 'pow-debug'
end

Order

pow-debug without strict indication trying to activate debug tools in such order:

  • First is pry-remote (can be used for any Ruby version);
  • if you use Ruby >= 1.9.2 second in row is debugger;
  • and last is ruby-debug or ruby-debug19 (for Ruby >= 1.9.2).

Usage

CLI

Restart server in debug mode

Also avaliable as pow-debug start.

bundle exec pow-debug

You can specify what debug tools you want to choose:

bundle exec pow-debug pry
  • pow-debug pry for pry-remote usage;
  • pow-debug debugger for debugger;
  • pow-debug ruby_debug for ruby-debug or ruby-debug19.

Start connection

Alias: pow-debug c.

bundle exec pow-debug connect

Manually

1. Restart and touch debug indicator:

touch tmp/debug.txt
touch tmp/restart.txt

In this step you also can specify what debug tools you want to choose. Instaed of touch tmp/restart.txt you can echo debug tools name into tmp/restart.txt:

echo debugger > tmp/restart.txt
  • echo pry for pry-remote usage;
  • echo debugger for debugger;
  • echo ruby_debug for ruby-debug or ruby-debug19.

2. Open application

E.g. open pushbio.dev for OSX.

3. Start remote debugger

If you are using debugger, ruby-debug or ruby-debug19:

bundle exec rdebug -c

If you are using pry-remote:

bundle exec pry-remote

Changelog

This project uses Semantic Versioning for release numbering.

v0.3.0

Still don't released and even not ready.

  • CLI with start and remote commands.

v0.2.0, released August 23, 2012

First, initial release.

Contributors

Idea and code by @kossnocorp.

Thanks to @paulnicholson who gave me push access to pow-debug gem.

License

The MIT License

Copyright (c) 2012 Sasha Koss

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.