Open canoeberry opened 6 years ago
Also another quick question. How does byebug implement breakpoints? Does it use the tracepoint API (as you have indicated) to get notified whenever a line of execution changes, and then check its breakpoints to see if that line matches any?
I looked at tracepoint and I don't see a native ruby mechanism for inserting breakpoint instructions, so, is it done with polling as I described?
Problem description
I am trying to understand how to build a remote client as a plugin for SublimeText. I am aware there is one already but it's old and I think byebug has changed a lot since it was last updated. E.g., creating a breakpoint from the control connection now seems to require a confirmation but the Sublime plugin doesn't seem to be aware of it.
My problem, after upgrading to 10.0.2 on ruby 2.4.1, is that I cannot get either the client or the client control connections to spit out the prompt. I am sure at least the control connection worked for me with byebug 9.
I also need help understand the difference between the two connections and why there's a requirement for two, when the control connection could seemingly do everything in theory if its command list weren't restricted.
Expected behavior
I start byebug in my Rails app as follows:
I used to also do
Byebug.wait_connection = true
but I decided I didn't want to do that, and it didn't seem to make a difference.Then when I telnet to the application on ports 5282 and 5283, I expected to be greeted with a prompt from at least the 5283 connection, and perhaps the 5282 connection after the program stops for some reason.
Actual behavior
Neither telnet sessions gets any output, and attempts to issue commands are ignored, as though there are no threads reading the accepted connections at all.
However, if I fire up Rails as follows:
BYEBUG=true byebug bin/rails server
the control connection does prompt me and does respond to input.
Steps to reproduce the problem
Fire up rails with code to start up the Byebug server, and try to connect to it via telnet.