-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
Love for remote debugging #406
Conversation
ebeea6a
to
182828f
Compare
Summoning @MSP-Greg in case you're interested. I've been working on remote debugging support. Not ready yet but looking good. However, I'm getting some failures on Windows and I don't have a Windows machine to debug. In case you would like to help out, I suspect it's something around setting binary mode in streams, but not sure. Regards! |
I'll have a look at it, might not be able to seriously do so until Saturday... Thanks, Greg |
That's great, thanks so much! |
182828f
to
e545240
Compare
Solution found. See commit in my fork, Appveyor results Probably not what you (or I) expected. Hope this helps, Greg EDIT:
|
Added another patch to swap the fork for Thread. See commit in my fork. Appveyor results. Appveyor runs with dual cores, Travis has four. The |
@MSP-Greg Thanks so much! Your fix makes a lot of sense since only Also thanks for letting me know about the ruby-core issue, I commented in there! And also thanks for fixing those tests to not use I'll either give you access to this branch to add your changes, or cherry-pick them myself! |
Thank you. I keep an eye on it (and the ruby-core Travis & Appveyor), and I knew you could address the issue(s) well. I'm also sensitive to issues that involve trunk, If someone is concerned about a given repo/gem functioning with trunk, they're welcome to fork and run their own CI, since many 'mature' repos/gems may not have frequent commits...
Whatever is easiest. Finally, I reverted 'Binmode?' with two commits, both passed. Thanks, Greg |
Would you prefer that I delete or revert the |
Delete 👍 |
b9239e7
to
7bddb3e
Compare
Sometimes Appveyor... Had this issue last night, where I changed Just upped it to 3, no change. I'm going to check/fix it on my fork. I must be missing something.... FYI - from all my testing on Appveyor (100's of trunk builds, rubygems builds, etc), I've seen lots of intermittent issues... |
I found what the issue was with my fork passing the one test. I dl'd a diff of the fork, and (oddly) one line was different. I even checked my browser history, and timestamps matched, so it was what GitHub had. The line Anyway, fixed that, I think I've got this working, just a few minutes more. The change is to to this: def readline(prompt)
puts(prompt)
result = (input.gets || "continue")
result.chomp
rescue Errno::EPIPE, Errno::ECONNABORTED
"continue"
end
Thoughts? trying on my fork shortly... Thanks, Greg |
Yeah, sorry! I realized that was incorrect and fixed it here, leaving your fork out of date indeed. Feel free to just work on this same branch instead of your fork, I'll be carefull with force-pushing :) Your fix looks good, but I think the |
That was before I got changed to 'collaborator', so I grabbed the changes and was working just in my fork in a different new branch. IOW, no problem.
I do that alot also. I'll try to restrict it to things I do before I push here.
Well, it (as listed) just passed on my fork with Appveyor. The commit is here. I haven't reviewed the remote code enough to know if a particular error should trigger a 'is the client dead?' check,.. Lastly, can we please remove the 'stop on failure' from Appveyor? I normally do all of my work with trunk. I was passing locally, pushed to Appveyor, and the build stopped on 2.3 (which lead to my adding |
Yeah, we can't know where the exception will be raised, and most of the times it will happen under the
Ok, since you are the only one here working on Windows, let's do whatever works best for you :) |
I'll defer to you. I'm just starting at the tests and moving inward. You know the whole thing. Changed. Test passed. Commit is here. I changed the Let me know if it's good, and I'll push it. then I'll move on to #416... |
Yep, that's what I meant. However, the
Mmmm, not sure. I think local variables have preference over attributes, if you were to set an attribute, you'd have to do |
Sorry I missed that. Changed.
Can't chomp nil though... Pushing shortly. Thanks. |
👍
I mean that, correctly but unnecessarily, calls |
Cool. Sorry, I meant that Thanks for cancelling Appveyor... |
Yup, that could fail. It was your way or mine, yours works :)
No problem. I'll give this a final look tomorrow, hopefully I can add coverage for a couple more cases! |
In the case of remote debugging, we don't want to close the interface after each repl. Introduced by e42078f. Adding initial tests for remote debugging.
Since, for example, running `continue` stops the debugger for performance if there's no active breakpoints or catchpoints.
Causing remote debugging to be very slow.
Sometimes tests time out on Linux too.
c1e2e2e
to
8359dfe
Compare
|
||
def print(message) | ||
super(message) | ||
rescue Errno::EPIPE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MSP-Greg Should we rescue Errno::ECONNABORTED
here and in puts
as well? You were seeing that exception on Windows, but only under some versions if I recall correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall, I'll have to check.
EDIT: I can't find anything re Errno::ECONNABORTED
, and I looked thru all the AV builds, both here and my fork. Can't see how it would hurt, especially with a remote.
Totally different subject, the exe/byebug
script can be run under windows with another file, but ideally the file contents (one line) should be dependent on whether the gem is installed normally or with a user-install
option. Somewhat ties into a PR/issue open in Rubygems right now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mentioned it here. I think I'll add Errno::ECONNABORTED
in the other methods as well then.
Re exe/byebug
, feel free to suggest any changes you want in a separate PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mentioned it here.
Sorry, rather distracted with 'non code' things yesterday evening.
Travis has had large Linux & MacOS backlogs recently (separate occasions). Hope they get it sorted out...
I'll merge this as soon as CI passes! I added a small question / comment but we could merge without it. |
Let's do this! |
This test case was introduced as a regression test of deivid-rodriguez#274 in deivid-rodriguez#406. The description of issues/274 says an exception will be raised if the byebug CLI is terminated when main program is sleeping. Before this commit there are 2 breakpoints (`byebug` method call) before `sleep 3` and `"cont"` is called once because the arugment of `remote_debug_connect_and_interrupt` is `"cont"`. I think this is not intended. And the method name of test case is `program_with_two_breakpoints`, on the other hand the program had 3 breakpoints (`byebug`).
This test case was introduced as a regression test of #274 in #406. The description of issues/274 says an exception will be raised if the byebug CLI is terminated when main program is sleeping. Before this commit there are 2 breakpoints (`byebug` method call) before `sleep 3` and `"cont"` is called once because the arugment of `remote_debug_connect_and_interrupt` is `"cont"`. I think this is not intended. And the method name of test case is `program_with_two_breakpoints`, on the other hand the program had 3 breakpoints (`byebug`).
Fixes #82.
Fixes #141.
Fixes #239.
Fixes #274.
Fixes #302.