forked from AndrewO/ruby-debug-pry
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b253a0e
Showing
4 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
source "http://rubygems.org" | ||
|
||
gem "pry", "~> 0.8.3" | ||
|
||
platform :mri_18 do | ||
gem "ruby-debug", "~> 0.10.4" | ||
end | ||
|
||
platform :mri_19 do | ||
gem "ruby-debug19", "~> 0.11.6", :require => "ruby-debug" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
archive-tar-minitar (0.5.2) | ||
coderay (0.9.7) | ||
columnize (0.3.2) | ||
linecache (0.43) | ||
linecache19 (0.5.12) | ||
ruby_core_source (>= 0.1.4) | ||
method_source (0.4.1) | ||
ruby_parser (>= 2.0.5) | ||
pry (0.8.3) | ||
coderay (>= 0.9.7) | ||
method_source (>= 0.4.0) | ||
ruby_parser (>= 2.0.5) | ||
slop (>= 1.5.3) | ||
ruby-debug (0.10.4) | ||
columnize (>= 0.1) | ||
ruby-debug-base (~> 0.10.4.0) | ||
ruby-debug-base (0.10.4) | ||
linecache (>= 0.3) | ||
ruby-debug-base19 (0.11.25) | ||
columnize (>= 0.3.1) | ||
linecache19 (>= 0.5.11) | ||
ruby_core_source (>= 0.1.4) | ||
ruby-debug19 (0.11.6) | ||
columnize (>= 0.3.1) | ||
linecache19 (>= 0.5.11) | ||
ruby-debug-base19 (>= 0.11.19) | ||
ruby_core_source (0.1.5) | ||
archive-tar-minitar (>= 0.5.2) | ||
ruby_parser (2.0.6) | ||
sexp_processor (~> 3.0) | ||
sexp_processor (3.0.5) | ||
slop (1.5.3) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
pry | ||
ruby-debug | ||
ruby-debug19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'rubygems' | ||
require 'bundler' | ||
Bundler.require | ||
$:.unshift(File.dirname(__FILE__) + "/../lib") | ||
require "ruby-debug/pry" | ||
|
||
class Foo | ||
attr_accessor :bar | ||
|
||
def initialize(bar) | ||
@bar = bar | ||
end | ||
end | ||
|
||
foo = Foo.new(5) | ||
debugger | ||
foo.bar += 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
require 'pry' | ||
require 'ruby-debug' | ||
|
||
module Debugger | ||
class PryCommand < Command | ||
def regexp | ||
/^\s* pry | ||
(?:\s+(-d))? | ||
\s*$/x | ||
end | ||
|
||
def execute | ||
unless @state.interface.kind_of?(LocalInterface) | ||
print "Command is available only in local mode.\n" | ||
throw :debug_error | ||
end | ||
|
||
get_binding.pry | ||
end | ||
|
||
class << self | ||
def help_command | ||
'pry' | ||
end | ||
|
||
def help(cmd) | ||
%{ | ||
pry\tstarts an Pry session. | ||
} | ||
end | ||
end | ||
|
||
end | ||
end |