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

'up' after 'step' keeps drilling down on 'next' #85

Closed
elado opened this issue Sep 29, 2014 · 11 comments
Closed

'up' after 'step' keeps drilling down on 'next' #85

elado opened this issue Sep 29, 2014 · 11 comments

Comments

@elado
Copy link

elado commented Sep 29, 2014

If I step into a method and then up, when I execute next it goes back to what next would be if I didn't hit up. My intention is to go back to the original stacktrace but it keeps going back to the one I stepped into.

The only way I can get away from it is to add a breakpoint somewhere else and cont.

It's been like that for a long time.

MRI Ruby 2.1.2, buybug 3.5.0.

deivid-rodriguez pushed a commit that referenced this issue Sep 30, 2014
@deivid-rodriguez
Copy link
Owner

Hi @elado, thanks for the report.

I've just added a test for this and it works for every ruby version recommended in the README. Could you upgrade to 2.1.3 and then try again?

Thanks.

@deivid-rodriguez
Copy link
Owner

Closing until reproduced in latest rubies.

@elado
Copy link
Author

elado commented Jan 9, 2015

@deivid-rodriguez as asked on #102 I'm still experiencing it, all the time. It's a big project but I'll find some time to isolate it.

@deivid-rodriguez
Copy link
Owner

So why open a new issue to workaround the problem instead of answering the question asked 3 months ago? It's really discouraging when people open issues and never reply to them. 👎 😞

@elado
Copy link
Author

elado commented Jan 9, 2015

Here it is: https://github.com/elado/byebug-issue

It happens during RSpec (but I recall it happened in multiple places).
Look at log.log to see the flow - how many up I need to run just to step into bar method.

Running on 2.2.0 MRI.

PS - you're totally right, and I apologize for not being responsive.

@deivid-rodriguez
Copy link
Owner

@elado Better late than never, thanks for the feedback.

The thing is, I'm not sure what the issue is, why you are typing all those step's and up's, and what your expected outcome is. Please, clarify this. That sequence of commands step, up, step doesn't make a lot of sense to me. Keep in mind that the instruction up does not execute any part of your program, it just travels the stacktrace.

In this case, to get to the bar method I would just continue unti you get there: continue 7 or c 7 will do that. The fact that the method definition is near in the source code or that the method is called in the current line doesn't mean you'll get there with a single step (not sure this is what you expect, but just in case). For example, in this case, the value of the argument to the method, foo, needs to be retrieved first.

@elado
Copy link
Author

elado commented Jan 9, 2015

  • In first step I want to get into bar
  • It steps through some RSpec code instead, because foo is essentially a generated method by let and it evaluates foo first.
  • I want to go back to the spec file, and the only way I know is up. I could add a breakpoint directly on bar implementation and do cont but that's not intuitive.
  • After up I go back to the spec
  • I still want to step into bar, so I step
  • Again, not going where I wanted, and I want to get back so I up a few times
  • And it goes on and on until a step actually gets into bar
  • Happens again later...

So unless I'm using it wrong, I see here a behavior that I'm not expecting. I use the same step/up/next in Xcode/Chrome etc and it behaves as expected.

@deivid-rodriguez
Copy link
Owner

So basically you expect (after having learned that foo is a generated method) that the sequence step, up, step will take you to bar, right? I think that makes sense, I'll have a look.

Just to confirm, you keep refering to the step, up, next sequence (in both the title and your last sentence) but this issue has nothing to do with next, right?

@deivid-rodriguez
Copy link
Owner

Give last master a try and let me know!

@elado
Copy link
Author

elado commented Jan 10, 2015

Perfect, awesome!
The next was related to this as it doesn't happen anymore. Thank you very much.

@deivid-rodriguez
Copy link
Owner

Your are welcome! Cheers! 😄

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

2 participants