Comments (26)
Hi @Intrepidd! Thanks for reporting this issue. Could you provide a test case (ideally) or any other way I can reproduce the error myself?
Salute.
from pry-byebug.
Hi.
This happens during my rspec tests.
I tried to create an empty rails app to reproduce the behaviour but it works there.
I guess this is somehow related to my config.
If the error does not seem familiar close the issue and I'll come back with more info if I manage to isolate this "bug".
Sorry to annoy you !
from pry-byebug.
No worries, you didn't annoy anyone! :)
I'm going to leave this opened and use pry-byebug with my rspec tests tomorrow. Maybe I'll run into error myself. Where are you putting the binding.pry
call? Inside a before
/after
block? Inside a it
block? Inside a let
/let!
block? Somewhere else?
Salute.
from pry-byebug.
The binding.pry
call was in an it block and in a model method that was called by let
block. Both were producing this error.
from pry-byebug.
Alright! What kind of spec was it? Model, controller, request?
from pry-byebug.
Controller spec, I imported my Gemfile and Gemfile.lock into my demo app and I got the issue again yay !
I'll try to exclude some gems to find which may cause the issue, I'll post a link to a github repository for this issue in a few minutes.
from pry-byebug.
Sweet!
from pry-byebug.
Well this is embarassing.
The pry related gems were in the :development
group.
Moving them to the global group fixed it.
Surprising how the rest work anyway ...
Sorry for that.
from pry-byebug.
You're not the only one to run into that, and won't be the last! :)
Glad you sorted it out.
from pry-byebug.
This seems related but not positive. I'm running into something very similar. If I put binding.pry anywhere in my app I can use next as long as the next line of execution doesn't move out of the current scope. If it does, such as a initialization of a new object it fails with the error listed above.
I'm running pry within the context of a bundle to control the active plugins. At this moment I have the following installed:
pry-rails, pry-doc, pry-docmore, pry-stack_explorer, pry-rescue, (bond, jist)
I made a test.rb file in the app and ran it using bundle exec ruby test.rb
and got the following:
(master) jobs:0 $ bundle exec rescue test.rb
Frame number: 0/11
From: /Users/bmcmullen/dev/example_app/test.rb @ line 4 Object#test:
3: def test
=> 4: binding.pry
5: str = "my string"
6: str.length
7: end
[1] pry(main)> next
ArgumentError: uncaught throw :breakout_nav
from /Users/bmcmullen/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/pry-byebug-1.2.0/lib/pry-byebug/commands.rb:220:in `throw'
I'm going to try and play around with removing some of the extraneous plugins to make sure this isn't a compatibility issues.
I'm running ruby 2.0.0p195 and Rails 4.0 (also tested with ruby 2.0.0p247)
from pry-byebug.
I'll be looking into this shortly! Thanks for the report!
from pry-byebug.
I'm testing pry-byebug and I'm having the same issue:
ArgumentError: uncaught throw :breakout_nav
from /opt/boxen/rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/pry-byebug-1.2.0/lib/pry-byebug/commands.rb:220:in `throw'
I can't isolate the bug right now, but I'll do that later.
from pry-byebug.
Nice, thanks!
from pry-byebug.
I'm seeing the same problem on Ruby 2.0.0-p353: "ArgumentError: uncaught throw :breakout_nav"
Same place in the code as above.
from pry-byebug.
Can you guys post your Gemfiles ?
from pry-byebug.
Ditto on the uncaught throw
bug!
from pry-byebug.
I was getting this same issue as well. I then noticed pull request #10. This appears to be the cause of the issue for me. When I add require 'pry-byebug'
before calling binding.pry
I don't get the uncaught throw
error.
from pry-byebug.
I've released a new version which includes @lukebergen's patch. Hope this fixes the issue.
from pry-byebug.
Closing as it seems that nobody is getting the issue anymore.
from pry-byebug.
I just noticed that you still get this if you happen to write pry.binding
instead of binding.pry
, just a heads up.
from pry-byebug.
First, I can confirm that pry.binding can cause this issue.
More importantly, I still have this issue in my tests, when pry stops with pry-rescue 1.4.1 and pry-byebug 2.0.0. I'm not sure if this is a pry, pry-byebug or pry-rescue issue. Any help appreciated.
from pry-byebug.
I stumbled the same error when I stupidly did require pry; binding.pry
instead of require 'pry'; binding.pry
. HTH
from pry-byebug.
@aledalgrande @mjrk What's the reason to use pry.binding
instead of binding.pry
?
from pry-byebug.
simply remembering things wrong 🚑
from pry-byebug.
@aledalgrande Could you try to reproduce this against last master? I seem to be getting
Cannot find local context. Did you use `binding.pry`?
which seems like a better error message.
from pry-byebug.
Closing for lack of feedback.
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.