Skip to content
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

it doesn't show stack after running to a breakpoint #21

Open
x-yuri opened this issue Jan 20, 2015 · 2 comments
Open

it doesn't show stack after running to a breakpoint #21

x-yuri opened this issue Jan 20, 2015 · 2 comments

Comments

@x-yuri
Copy link

x-yuri commented Jan 20, 2015

#!/usr/bin/env ruby
require 'pry'
def f
  puts 'f'
end
binding.pry
f
$ ./1.rb

Frame number: 0/6

From: /home/yuri/_/1.rb @ line 7 :

    2: require 'pry'
    3: def f
    4:   puts 'f'
    5: end
    6: binding.pry
 => 7: f

[1] pry(main)> show-stack
when_started hook failed: NoMethodError: private method `eval' called for nil:NilClass
/home/yuri/.gem/ruby/2.1.5/gems/pry-stack_explorer-0.4.9.1/lib/pry-stack_explorer.rb:109:in `bindings_equal?'
(see _pry_.hooks.errors to debug)

Showing all accessible frames in stack (7 in total):
--
=> #0  <main> 
   #1 [block]   block in run <PryByebug::Processor#run(initial=?, &_block)>
   #2 [method]  run <PryByebug::Processor#run(initial=?, &_block)>
   #3 [method]  resume_pry <PryByebug::Processor#resume_pry(context)>
   #4 [method]  at_line <PryByebug::Processor#at_line(context, _file, _line)>
   #5 [method]  at_line <Byebug::Context#at_line(file, line)>
   #6 [main]    <main>
[2] pry(main)> break #f
Breakpoint 1: Object#f (Enabled) :

3: def f
4:   puts 'f'
5: end

[3] pry(main)> c
when_started hook failed: NoMethodError: undefined method `last' for nil:NilClass
/home/yuri/.gem/ruby/2.1.5/gems/pry-stack_explorer-0.4.9.1/lib/pry-stack_explorer/when_started_hook.rb:49:in `remove_internal_frames'
(see _pry_.hooks.errors to debug)

Breakpoint 1. First hit

From: /home/yuri/_/1.rb @ line 3 Object#f:

 => 3: def f
    4:   puts 'f'
    5: end

[1] pry(main):1> show-stack
No caller stack available!
[2] pry(main):1> quit
=> #<Pry::Result:0x007faa46ff2470 @is_command=true, @retval=main>
[3] pry(main)> show-stack
No caller stack available!
[4] pry(main)> quit
f

Aside from pry-stack_explorer, there's also pry-byebug loaded.

@x-yuri x-yuri changed the title doesn't show stack after running to a breakpoint it doesn't show stack after running to a breakpoint Jan 21, 2015
@gbmoretti
Copy link

Same here. But I'm getting
when_started hook failed: TypeError: bind argument must be an instance of Object /home/gbmoretti/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/pry-0.9.12.6/lib/pry/helpers/base_helpers.rb:23:inbind'
(see pry.hooks.errors to debug)` warning

@deivid-rodriguez
Copy link

@gbmoretti pry-byebug is incompatible with pry-stack_explorer but it provides equivalent functionality built-in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants