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

Emacs freezes when robe is called while byebug is active on console #130

Open
otavioschwanck opened this issue Apr 25, 2021 · 3 comments
Open

Comments

@otavioschwanck
Copy link

otavioschwanck commented Apr 25, 2021

when byebug is active on the console and i try to call some robe action (like company or go to definition), the emacs freezes.

@dgutov
Copy link
Owner

dgutov commented Apr 25, 2021

How/when does this happen?

Doesn't one usually use byebyg from binding.pry somewhere inside test code, rather than inside the main project IRB console?

Even so, I tried the latter, and robe didn't freeze.

Need step-by-step scenario.

@otavioschwanck
Copy link
Author

otavioschwanck commented Apr 26, 2021

@dgutov

How/when does this happen?

Doesn't one usually use byebyg from binding.pry somewhere inside test code, rather than inside the main project IRB console?

Even so, I tried the latter, and robe didn't freeze.

Need step-by-step scenario.

occurs when byebug is called on console (using inf-ruby).

1 - add byebug to your project:
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]

2 - place byebug on some class (lib/foo.rb on initialize)

3 - Open rails console in emacs and start robe (robe-start)

4 - on rails console, call Foo.new

5 - A byebug will open on console

6 - in any file of your project, call robe-jump or company-robe.

7 - The freeze will happen.

Happens on macos and linux. Emacs 26, 27 and 28.

Video:
https://user-images.githubusercontent.com/9551316/116024345-634dab00-a624-11eb-8c81-20016f4b339b.mp4

EDIT: with binding.pry it works but it looks a little weird on emacs, do you have any tip to improve binding pry on emacs ?

@dgutov
Copy link
Owner

dgutov commented Apr 27, 2021

Thanks, I see it now. I just tried binding.pry. byebug indeed does something that stops requests/responses going through. Not sure how to fix it, or at least not yet.

do you have any tip to improve binding pry on emacs ?

Perhaps https://github.com/deivid-rodriguez/pry-byebug? It adds stepping commands and even breakpoint functionality.

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

2 participants