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
feat(cli): Support using both --watch
and --inspect
at the same time
#20660
Conversation
I tried But unsurprisingly, connecting to a specific thread using
Although I can't seem to reproduce this anymore now. Another issue might be that if the debugger is paused, making a change doesn't restart the application until the debugger is resumed. @bartlomieju Are these the pointers you were referring to? Or was this about showing the console message? |
I managed to reproduce it again. Full stack trace
|
@jespertheend nice work! The panic you are hitting is somewhat expected - before this change, we didn't allow using I think for starters, you can try to add an "else" branch to the |
Thanks @bartlomieju! That seems to have done the trick, as I am no longer able to reproduce the panic. As for the console message, my initial thought was to print the message inside the operation of |
@jespertheend sorry I'm misunderstanding something; what message are you referring to? |
@bartlomieju In #20525 a console message was briefly discussed that warns the user that their inspector has been disconnected. Right now the regular "Debugger session ended" is not printed, and even if it were, the console is cleared when watching. Not displaying a message is fine by me as well. A disconnected inspector is generally what I'd expect when the process restarts. |
@jespertheend maybe let's skip it for now since as you said the screen is cleared anyway. |
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.
@jespertheend this looks good to me, any chance you could add a test to cli/tests/integration/watcher_tests.rs
that showcases this change?
@bartlomieju I wasn't sure how to write a test that specifically triggers the right conditions for that panic. But I've added a test that at least checks if the debugger restarts when a watched file is changed. |
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.
LGTM, nice work @jespertheend. I'm gonna change the title of the PR to be "fix" as I think it's not really a new feature, just fixing a problem we had before that prevented it from working. Expect it to be released in v1.37.2 next week.
Fixes #20525