New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pry-byebug not worked directly in $lOAD_PATH. #53
Comments
@zw963 Sorry I missed this issue. Do you think you can try a pull request to fix this? |
OK, I will have a try to use Pry new API add command in. |
Does this need a new command?? |
I think should do so. It seem like add pry use a new way to add commands in, so I thought should rewrite those two commands But, I don't know why it worked when install as gem ... |
Ah, ok, you're talking about rewriting the commands, not adding new ones. |
Hi, I try rewriting command with following gist, original error is fixed, from wiki, I got this:
But it not worked for me. (pry):0> next
NoMethodError: undefined method `breakout_navigation' for #<Pry::Command::Next:0x00000002e34bb0> breakpoint.rb stepping.rb I am missing too much pry context, what I can do is just this, sorry. |
I make a new issue for link here: pry/pry#1396 |
@zw963 Thanks for your help and effort. I understand you might want to give up trying but I'd like to ask for a pleasure:
This will help me a lot when I work on this issue to see where you left it and be able to reuse your work. |
I update commit. : ) |
I saw that you updated the commit, thanks! |
I add a new pull request for this, seem like it worked : ) |
I update to pry-byebug 3.1.0, and remove unrelated gems affect, the finally backtrace output like this: /home/zw963/Dropbox/common/ruby/gems/pry/commands/breakpoint.rb:215:in `<class:Pry>': undefined method `commands' for Pry:Class (NoMethodError)
from /home/zw963/Dropbox/common/ruby/gems/pry/commands/breakpoint.rb:8:in `<top (required)>'
from /home/zw963/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/zw963/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/zw963/Dropbox/common/ruby/gems/pry/commands.rb:5:in `block in <top (required)>'
from /home/zw963/Dropbox/common/ruby/gems/pry/commands.rb:4:in `each'
from /home/zw963/Dropbox/common/ruby/gems/pry/commands.rb:4:in `<top (required)>'
from /home/zw963/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/zw963/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/zw963/Dropbox/common/ruby/gems/pry.rb:145:in `<top (required)>'
from /home/zw963/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/zw963/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/zw963/Dropbox/common/ruby/gems/bin/pry:9:in `<main>' What I does is simple enough, I setting environment variable Could you give me a clue about how to fix this? (and no need rewrite command.) |
Thanks @zw963, I'll have a look when I can. |
@zw963 This should be fixed in latest master. Could you please confirm? |
It seem fix in newest github version, currently, pry can load successfully. but, it seem like cause another problems.
|
pry-byebug version: ca01c53 byebug: 4.0.5, this version worked with old version pry-byebug, so, it seem like Thank very much! |
Hi, I only could give some clue for this, and I will try reproduce possibly bugs about this: position location error. ☠ $ cat test1.rb
1 #!/usr/bin/env ruby
2
3 require 'pry-byebug'
4 binding.pry
5 puts 'hello'
6 ☠ $ ruby test1.rb Frame number: 0/6
From: /home/zw963/Dropbox/common/code/ruby/test1.rb @ line 5 :
1: #!/usr/bin/env ruby
2:
3: require 'pry-byebug'
4: binding.pry
=> 5: puts 'hello'
(pry):0> If change to require ☠ $ ruby test1.rb
Frame number: 0/0
From: /home/zw963/Dropbox/common/code/ruby/test1.rb @ line 4 :
1: #!/usr/bin/env ruby
2:
3: require 'pry'
=> 4: binding.pry
5: puts 'hello'
(pry):0> Use binding_of_caller gems can reproduce the same bug: ☠ $ cat test1.rb
1 #!/usr/bin/env ruby
2
3 require 'binding_of_caller'
4
5 def pry!
6 require 'pry-byebug'
7 binding.of_caller(1).pry
8 end
9
10 pry!
11 puts 'hello'
12 ☠ $ ruby test1.rb
Frame number: 0/7
From: /home/zw963/Dropbox/common/code/ruby/test1.rb @ line 8 Object#pry!:
5: def pry!
6: require 'pry-byebug'
7: binding.of_caller(1).pry
=> 8: end
(pry):0> If change ☠ $ ruby test1.rb
Frame number: 0/1
Frame type: main
From: /home/zw963/Dropbox/common/code/ruby/test1.rb @ line 10 :
5: def pry!
6: require 'pry'
7: binding.of_caller(1).pry
8: end
9:
=> 10: pry!
11: puts 'hello'
(pry):0
this seem like fix, it seem like cause by myself (public gems conflict with project gems) Others clue: ☠ $ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.6)
bundler (1.7.13)
bundler-unload (1.0.2)
executable-hooks (1.3.2)
gem-wrappers (1.2.7)
io-console (0.4.3)
json (1.8.1)
minitest (5.4.3)
power_assert (0.2.2)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
test-unit (3.0.8) $RUBYOPT is not set. $RUBYLIB is IN my |
The above possible bug not found at:
I address this with write a pry! wrapper method, although I really want to |
@zw963 The "position location error" is not a bug, but a feature. The marker position was changed in Regarding the And regarding your last message, I encourage you to work on |
Thank you for clarify. before change to 2.0, I use this wrapper method skip to upper frame. def pry!
require 'pry-byebug'
upper_frame_binding = binding.of_caller(1);
upper_frame_binding.pry
end in version 2.x, Frame number: 0/7
From: /home/zw963/Dropbox/common/code/ruby/test1.rb @ line 9 Object#pry!:
5: def pry!
6: require 'pry-byebug'
7: upper_frame_binding = binding.of_caller(1);
8: upper_frame_binding.pry
=> 9: end if it worked, I think it should stop at here ? Frame number: 0/1
Frame type: main
From: /home/zw963/Dropbox/common/code/ruby/test1.rb @ line 11 :
6: require 'pry-byebug'
7: upper_frame_binding = binding.of_caller(1);
8: upper_frame_binding.pry
9: end
10:
11: pry!
=>12: puts 'hello'
(pry):0> How should I resolve this? |
I agree that is unexpected behaviour and the previuos one was better. I'll have a look at it when I can. But I wonder why you're using that in the first place. Your calling |
hehe, just more less typing, and can wrap more logic in wrapper method. e.g. Thank you. |
I don't want to add a new issue for following. If can, could you add a toggle to allow disable start at pry at next line. it work not well with binding.of_caller, I use pry-byebug so long, but keep still use 1.3.3, |
If need, I can add a new feature request for this. Thanks. |
Because some special reason, I use $LOAD_PATH directly. some gem is not manager by
gem, just directly put into $LOAD_PATH, make it work.
But, from 1.3.2 update to 3.0.1, it not worked for me.
it caused only by pry-byebug, byebug is work file.
Thanks.
The text was updated successfully, but these errors were encountered: