Git Product home page Git Product logo

Comments (17)

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

Hei! So there's two different issues here.

For the first one, you're right, pry-byebug cannot stop at breakpoints when code is evaluated from command prompt. I might revisit this in the future, but currently "subdebuggers" are not allowed.

For the second one, pry automatically requires plugins by default even if you specifiy require: false in your Gemfile (I know, weird). But it allows the user to configure that behaviour through the Pry.config.should_load_plugins = false configuration. Just drop it in your .pryrc file and you'll get a more sane behaviour!

from pry-byebug.

akostadinov avatar akostadinov commented on May 22, 2024

Ok, thanks, .pryrc that can help have both options.

I'm just interested, what is the reason to not allow sub-debuggers? Or is it just current implementation. If it is a question of preference, maybe it needs to be done optional?

from pry-byebug.

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

Yes, it's just a limitation of the current implementation, I'm not against it.

from pry-byebug.

JESii avatar JESii commented on May 22, 2024

Hi... I've run into the same problem and it's breaking my normal workflow of entering pry and calling various routines with binding.prys to see how things are working. Any chance sub-debuggers can be added? I'd be willing to help if I can. Thanks.

from pry-byebug.

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

Do you guys would like a proper pry-byebug console (with debugging commands) or a regular pry would be enough. If you want to the latter, I think stop monkeypatching pry and create "our own binding.pry" with debugging capabilities would work.

Proper debugging inside REPL evaluation commands needs to be fixed/added in byebug itself, either by default or through a custom command as suggested in deivid-rodriguez/byebug#121

from pry-byebug.

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

I pushed a fix to this. Could you please try pry-byebug + latest byebug master and tell me if it works?

from pry-byebug.

akostadinov avatar akostadinov commented on May 22, 2024

Thank you, do you have nightly builds or should I compile from source?

from pry-byebug.

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

The easiest way to try this, if you're using bundler, is:

git clone https://github.com/deivid-rodriguez/pry-byebug
git clone https://github.com/deivid-rodriguez/byebug
cd byebug
bundle
bundle exec rake compile

and then point to your local clones in the Gemfile of your app:

gem 'pry-byebug', path: '/path/to/your/local/pry-byebug/clone'
gem 'byebug', path: '/path/to/your/local/byebug/clone'

from pry-byebug.

JESii avatar JESii commented on May 22, 2024

Thanks! I'll try to give this a shot today...

from pry-byebug.

JESii avatar JESii commented on May 22, 2024

Didn't work for me; here's what I did after building the latest versions and updating my Gemfile (the bundle install confirmed that I was using my local source).

  1. added binding.pry to one of my methods
  2. Executed a cucumber step which simply drops me into pry with a binding.pry
  3. Called the method in step 1 above
  4. The method completed without executing the contained binding.pry.
    Did I miss something?

from pry-byebug.

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

Your steps seem correct, I'll have another look. Could you confirm at least this works using byebug only?

from pry-byebug.

JESii avatar JESii commented on May 22, 2024

OK; let me check...

from pry-byebug.

JESii avatar JESii commented on May 22, 2024

Works just fine with byebug only...

from pry-byebug.

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

👍

from pry-byebug.

JESii avatar JESii commented on May 22, 2024

Hi, Deivid... Is this ready to be updated to our Gemfile for both pry-byebug and byebug or is there something else you need me to test?
BUT: pry-byebug still requires byebug ~> 5.0 so I can't update our project Gemfile without an update to pry-byebug.Thanks.

from pry-byebug.

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

Nope, this needs more work.

from pry-byebug.

JESii avatar JESii commented on May 22, 2024

OK; thanks... let me know if there's anything you need me to do.

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.