-
Notifications
You must be signed in to change notification settings - Fork 129
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
REPL prints next prompt without printing result of previous command #1021
Comments
I've noticed lately that often the easiest way to un-stick the REPL is to run a sleep from the prompt.
I still don't have a reliable repro, but it does seem to happen very often intermittently. Maybe this offers a clue? |
Does it always happen when you debug inside a live Rails server, or it happens when you debug tests too? Also, could you try setting I don't have much proof atm, but I suspect it could be caused by inspecting frame arguments causing a livelock due to the thread-freezing mechanism. And evaluating input now temporarily unfreezes threads, which could resolve the locking as a side-effect. |
Now I'm wondering if I see it on a live development server—it may just be while debugging specs. And I'm usually debugging system specs that are driving a chrome browser with cuprite. So I wonder if that is related. I tried setting I've started running If you have any diagnostic ideas, let me know. I'm just not sure what to look for. |
Your environment
ruby -v
:rdbg -v
:I should point out that I am loading
debug
from the github repo at revision3d0f4e3225c4
after the discussion in #1000:Describe the bug
The REPL intermittently gets stuck in a state where it will not print the result of commands, even though it seems that they are continuing to be processed.
To Reproduce
I don't have a reliable repro process, but I will note that I have noticed this behaviour after sending the
next
command, and also after trying to evaluate an instance method at a breakpoint. Examples in the Additional context section below. Sendingputs ''
to the repl sometimes seems to help bring it back to the expected behaviour, but not always.Expected behavior
I expect the REPL to print the result of each command before printing the next prompt.
Additional context
Here's an example where I tried to run `next` multiple times, and I encountered this behaviour. I was eventually able to shake it loose by running `puts 'hello'`, and it appears that the debugger had advanced forward in the background, even though it had not provided feedback.
Here's another case where using `puts` was able to break me out:
Here's another example where using `puts` did not help, but it did finally shake loose when i sent only `;`.
Another case where `puts` didn't work once, but seemed to work later
I suspect this is a race condition of some kind. If I notice any more patterns, I'll update this issue. If anyone has any troubleshooting or reproduction suggestions, let me know.
Thanks
The text was updated successfully, but these errors were encountered: