Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

global vars command fails in rails project #103

Open
os97673 opened this Issue · 3 comments

2 participants

Oleg Sukhodolsky Gabriel Horner
Oleg Sukhodolsky

I have very basic Rails 4 project (https://github.com/akutarba/rails4-debugger-xml-app)
There is a breakpoint at https://github.com/akutarba/rails4-debugger-xml-app/blob/master/app/controllers/shops_controller.rb#7.
I run it with ruby-1.9.3-p448, open http://localhost:3000/shops in browser to stop at the break point and try to get global vars (v g command)
I'm getting "*** Errno::ENOENT Exception: No such file or directory - -b"

It looks like debugger fails to evaluate $FILENAME for some reasons :(
The quick workaround for the problem would be filter $FILENAME out of list of global vars in ::Debugger::VarFunctions#var_global, but it is unclear why it is evaluated correctly in other situations.

Gabriel Horner
Owner

Thanks for reporting your issue! This is one of my 10 active issues. Use that link to check how soon your issue will be answered. Don't forget to check your issue against this project's CONTRIBUTING.md. Cheers.

Oleg Sukhodolsky os97673 referenced this issue from a commit in os97673/debugger
Oleg Sukhodolsky os97673 Workaround for #103: let's do not evaluate for now 784fec7
Oleg Sukhodolsky os97673 referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Gabriel Horner
Owner

It's possible this is happening because the rescues are too weak. Pull request to handle the above exception would be great

Gabriel Horner cldwalker added the bug label
Gabriel Horner cldwalker changed the title from unable to get global vars in rails project to global vars command fails in rails project
Oleg Sukhodolsky

@cldwalker actually the problem is that Command#debug_eval throws :debug_error and the code you've pointed doesn't catch it.
Do you think it should?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.