pry / pry-stack_explorer

Walk the stack in a Pry session
Other
454 stars 28 forks source link

it should work across thread creation boundaries #2

Closed dominikh closed 8 years ago

dominikh commented 12 years ago

Imagine the following code:

require "pry-stack_explorer"

def a
  b
end

def b
  Thread.new { c }.join
end

def c
  d
end

def d
  binding.pry
end

a

Currently, stack_explorer will only be able to display the last three steps of the stack (in methods d, c and b). It does not know how we got into b though:

Showing all accessible frames in stack (3 in total):
--
=> #0 [method]  d <Object#d()>
   #1 [method]  c <Object#c()>
   #2 [block]   block in b <Object#b()>