Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you paste multiple lines of code? #359

Closed
ndbroadbent opened this issue Oct 12, 2017 · 3 comments
Closed

How do you paste multiple lines of code? #359

ndbroadbent opened this issue Oct 12, 2017 · 3 comments

Comments

@ndbroadbent
Copy link

ndbroadbent commented Oct 12, 2017

I've been having a lot of frustration with byebug, because I can't paste multiple lines of code from my editor. Also, when I try to run irb, it doesn't have the same binding as the breakpoint. Is this a bug?

irb(main):001:0> self
=> main

How can I paste multiple lines of code, for example to overwrite a method definition, or even just a multiline condition or case statement? I frequently do this in IRB, or in the Rails console, and would love to know if byebug can support this.

@ndbroadbent
Copy link
Author

I've switched to using binding.pry with pry-byebug, and that's a much better experience. Also much better when I use these aliases in my ~/.pryrc.

Now the only remaining issue is that binding.pry is really long to type, and I want to make a shortcut. Is there anyway I can add a shorter alias to my ~/.pryrc?

@deivid-rodriguez
Copy link
Owner

I figure this could be related to #367, so I'll close this and follow up in there. Regarding the question about aliases, I have no idea.

@stevecondylios
Copy link

+1 for this capability, if it were possible to paste in multiple lines of code, that would be very handy. Incidentally, I asked here also.

@ndbroadbent is it possible to explain in a little more detail what you did to improve the experience as I shall also try that (I haven't used any debugging software other than byebug, e.g. haven't used pry-byebug before)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants