-
Notifications
You must be signed in to change notification settings - Fork 127
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
Improved stability for chrome debugging #893
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ono-max san could you check it? |
- Display the greeting message regardless of the status of invocation of chrome. This allows coming back to the debugger on a new tab when the window process by `UI_CDP.run_new_chrome` is killed. - Handle `Errno::ESRCH` in `UI_CDP.cleanup_reader`. When the process by `UI_CDP.run_new_chrome` is killed, re-killing it breaks your debugging session and in turn the "debugee".
`UI_ServerBase#greeting` calls `#puts` with no arguments, this breaks reconnections to the debugger.
`Session#process_protocol_request` gracefully handles `Errno::ENOENT` when `eval`-ing `$FILENAME`, and it doens't exist.
josegomezr
force-pushed
the
improve_stability_chrome_debugger
branch
from
March 7, 2023 12:29
eb9e657
to
fd70fb6
Compare
ono-max
approved these changes
Mar 7, 2023
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.
Thank you for your investigation.
Also, I supported reattaching in #917 👍
Looks like a flaky test in CI, I couldn't replicate exactly that error locally. On a run I got:
but the next run was green (?), weird. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Describe your changes: Improved stability for chrome debugging
Display the greeting message regardless of the status of invocation of chrome.
This allows coming back to the debugger on a new tab when the window process by
UI_CDP.run_new_chrome
is killed.Handle
Errno::ESRCH
inUI_CDP.cleanup_reader
.When the process by
UI_CDP.run_new_chrome
is killed, re-killing it breaks your debugging session and in turn the "debugee".Background
I stumble upon this inconvenience when using it in a rails application, I noticed that after closing the chrome window I couldn't go back to it, and re-attaching with
bin/rdbg -A --open=chrome
gave more cryptic errors.Also when restarting the app to get a hold of the debugging window, I noticed it throws
Errno::ESRCH
.These changes should address the minor annoyances, out of ignorance I'd not venture into why "reattaching" as I tried to doesn't work 😅
Steps to reproduce
Do the following prelude before the testing the behavior.
OPT 1 (calling
DEBUGGER__.open(nonstop: true, open: 'chrome')
)DEBUGGER__.open(nonstop: true, open: 'chrome')
debugger
breakpoint somewhere accessibleOPT 2 (running the app with
rdbg --open=chrome
)debugger
breakpoint somewhere accessiblerdbg --open=chrome %your application here%
Verify Changes
devtools://
URLdevtools://
URL#<Errno::ESRCH: No such process>
line in the logsP.S. 1: modified the description to include more details about how to reproduce & what to expect.