Giter VIP home page Giter VIP logo

Comments (3)

deivid-rodriguez avatar deivid-rodriguez commented on May 31, 2024

Hi @davidrunger, thanks for the report.

The fact that you stayed in line 6 after the first next is a bug, which has been recently fixed in ruby-core: https://bugs.ruby-lang.org/issues/10449. It'll be released with Ruby 2.2, probably by the end of this month. If you want the fix now you have several options:

  • Install ruby-head which should be pretty stable as it's very close to a release.
  • If you want to stick to 2.1, byebug provides a workaround for this (which will be removed once the issue is fixed). You can either use the commands step+/next+ or enable the forcestep setting (set forcestep) and use the usual next/step commands. This way you will always change line and you will get the expected behaviour.

Regarding the second transition, I think that's actually expected. next steps over method calls and blocks whereas step steps into them. You're looking for step here, not next. See this test case for some relevant examples.

Hope this helps.

from pry-byebug.

davidrunger avatar davidrunger commented on May 31, 2024

David, I cannot thank you enough for the prompt reply. It was helpful indeed.

I had been lead to expect the 6 => 7=> 8 behavior by my experiences debugging with pry in Ruby 1.9.3, which does behave in this way when using next. Personally I prefer the 1.9.3 behavior because I don't have to look at each line to see if it contains a method call that I want to step into; I can just dumbly (and more quickly) march forward line-by-line.

Thank you again for responding, and for all of your work on this gem and byebug!

from pry-byebug.

deivid-rodriguez avatar deivid-rodriguez commented on May 31, 2024

@davidrunger You are welcome!

I didn't know the behaviour in 1.9.3 was different but I agree that your expected behaviour might feel more natural (specially when you already had it in an older debugger). I implemented it this way because it was much easier to delevop that way and it made sense to me when I thought about it. Now I think it might be too late/hard to revisit this but I'll keep this in mind anyways.

I'm closing this, and will leave #25 opened until the bug with the duplicate events is definitely closed.

Cheers!

from pry-byebug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.