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

Rescue unhandled exceptions functionality #60

Open
wsny opened this issue Apr 29, 2015 · 7 comments
Open

Rescue unhandled exceptions functionality #60

wsny opened this issue Apr 29, 2015 · 7 comments

Comments

@wsny
Copy link

wsny commented Apr 29, 2015

PR #55 seems to have broken compatibility with pry-rescue and its use of pry-stack_explorer (see ConradIrwin/pry-rescue#85). #55 overrides the up and down commands that pry-stack_explorer has, and pry-rescue is trying to go around pry-byebug it would seem, but can only access pry-byebug up and down commands now.

@deivid-rodriguez
Copy link
Owner

Yes, pry-byebug is incompatible with pry-stack_explorer or any plugins making use of it. byebug already provides the functionality pry-rescue offer so the solution I'd like for this issue is to bring that functionality through byebug.

I'll leave this open as a remainder.

@deivid-rodriguez deivid-rodriguez changed the title Broken compatability with pry-rescue and pry-stack_explorer Rescue unhandled exceptions functionality Apr 29, 2015
@aoyama-val
Copy link

Hi.
Does byebug already have "Rescue unhandled exceptions functionality"? How can I make it work?
Also, byebug's frame output format is pretty different from that of pry-rescue's show-stack. show-stack lists all frames up to the top, so it's more informative. Is is possible to implement it in byebug?

[5] pry(main)> show-stack

Showing all accessible frames in stack (6 in total):
--
=> #0  ccc <Object#ccc()>
   #1 [block]   block in ccc <Object#ccc()>
   #2 [method]  ccc <Object#ccc()>
   #3 [method]  bbb <Object#bbb()>
   #4 [method]  aaa <Object#aaa()>
   #5 [main]    <main>
[6] pry(main)> frame
#0  ccc <Object#ccc()>
      in main @ hoge.rb:23

@deivid-rodriguez
Copy link
Owner

Hi @aoyama-val, thanks for your comments.

byebug does have the "rescue unhandled exceptions" functionality. You have to enable the post_mortem option through set post_mortem. But, there are some issues with it in rubies >= 2.2.4, see deivid-rodriguez/byebug#165. I'm not sure whether it's totally broken or not, you can try.

Regard the way of showing the stack, you're mistaking the frame command with the bt (or backtrace or where command). That's the correct way of showing the full stack.

@aoyama-val
Copy link

Hi @deivid-rodriguez, thanks for the information.

I gavepost_mortem a quick try with Ruby 2.3.0, and I didn't notice any failure. So it seems not broken totally.

byebug has bt/backtrace/where commands, but pry-byebug does NOT. So we cannot use them in a pry session. Am I missing something?

@deivid-rodriguez
Copy link
Owner

You're welcome! I'm glad the good old post-mortem mode is still usable :)

Regarding your second comment, yes, you're right. pry-byebug needs a command to show the full stack. I thought you were aware of it since you mentioned byebug's frame command in your first message (which exists too). Now I see you meant pry-byebug's frame command.

In any case, feel free to work on adding this new show-stack command!

@vincentwoo
Copy link

Any progress on bringing post-mortem functionality through to pry-byebug from byebug?

@deivid-rodriguez
Copy link
Owner

Not really, sorry.

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

No branches or pull requests

4 participants