Comments (3)
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 commandsstep+
/next+
or enable theforcestep
setting (set forcestep
) and use the usualnext
/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.
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.
@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)
- It's possible to start a REPL session passing a command? HOT 1
- Loading pry-byebug on Archlinux fails with "cannot load such file -- irb" HOT 1
- Newest version of Pry breaks pry-byebug HOT 15
- Pry Byebug specifies an older version of Pry HOT 1
- Deprecation warnings in Ruby 2.7 HOT 2
- Pry "next" alias does not work
- Any plans for a new release? HOT 4
- less: unrecognized option: X HOT 1
- PR proposition : Deprecated - Pry.config.control_d_handler HOT 6
- Repeated newlines in multi-line strings are ignored
- NameError: undefined local variable or method `text' for #<PryByebug::BreakCommand HOT 2
- New release? HOT 2
- Deprecation warnings Pry v 0.14.1 on Ruby v 3.1.1 HOT 1
- Relax restriction for byebug version HOT 5
- The version 3.10.0 breaks rails console HOT 8
- Build failure with ruby-pry-byebug version 3.9.0-1
- Run error using Ruby 3.2 HOT 1
- Deprecation on Ruby 3.2.2
- Compatibility Inquiry: pry-byebug 3.10.1 with Ruby 3.3.0
- Question: Is there a recommended way of requiring the gem for test but not CI?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pry-byebug.