Giter VIP home page Giter VIP logo

Comments (26)

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

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.

Intrepidd avatar Intrepidd commented on May 30, 2024

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.

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

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.

Intrepidd avatar Intrepidd commented on May 30, 2024

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.

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

Alright! What kind of spec was it? Model, controller, request?

from pry-byebug.

Intrepidd avatar Intrepidd commented on May 30, 2024

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.

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

Sweet!

from pry-byebug.

Intrepidd avatar Intrepidd commented on May 30, 2024

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.

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

You're not the only one to run into that, and won't be the last! :)

Glad you sorted it out.

from pry-byebug.

Krustal avatar Krustal commented on May 30, 2024

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.

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

I'll be looking into this shortly! Thanks for the report!

from pry-byebug.

hugobarauna avatar hugobarauna commented on May 30, 2024

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.

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

Nice, thanks!

from pry-byebug.

gpherguson avatar gpherguson commented on May 30, 2024

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.

Intrepidd avatar Intrepidd commented on May 30, 2024

Can you guys post your Gemfiles ?

from pry-byebug.

epitron avatar epitron commented on May 30, 2024

Ditto on the uncaught throw bug!

from pry-byebug.

phemmer avatar phemmer commented on May 30, 2024

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.

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

I've released a new version which includes @lukebergen's patch. Hope this fixes the issue.

from pry-byebug.

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

Closing as it seems that nobody is getting the issue anymore.

from pry-byebug.

aledalgrande avatar aledalgrande commented on May 30, 2024

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.

mjrk avatar mjrk commented on May 30, 2024

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.

dimidd avatar dimidd commented on May 30, 2024

I stumbled the same error when I stupidly did require pry; binding.pry instead of require 'pry'; binding.pry. HTH

from pry-byebug.

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

@aledalgrande @mjrk What's the reason to use pry.binding instead of binding.pry?

from pry-byebug.

aledalgrande avatar aledalgrande commented on May 30, 2024

simply remembering things wrong 🚑

from pry-byebug.

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

@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.

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

Closing for lack of feedback.

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.