-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Add --debug-adapter
flag to run
#15829
Conversation
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
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.
Nice incremental introduction.
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 recommend landing the public option until it can be used for something. That's confusing for users why they would ever use it.
What's the motivation to land this now?
I suppose I can hold off until https://docs.google.com/document/d/1R9m-DtM8Y5UKx5iam5ipeK531tZR40_P7El4ucYq4Po is in |
I've pushed some code which gets |
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
Not a draft anymore thanks to I'll make a follow-up PR to integrate that into the Also, I'm struggling to find a reasonable way to automated-test these, which we very much should. Ideas welcome! |
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
I'm going to wait until #15928 is in and use it here. |
Also: does this need any doc updates? Perhaps to the |
Yeah I owe docs for |
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
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.
THanks! All my feedback applies to the test
docs too
ResolvePexEntryPointRequest(field_set.entry_point), | ||
), | ||
Get(RunRequest, PexBinaryFieldSet, field_set), | ||
Get(Pex, PexRequest, debugpy.to_pex_request()), |
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.
Should we avoid installing debugpy if you aren't using it? That saves time and avoids possible issues with the PEX not being installable.
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.
This is in a RunDebugAdapterRequest
rule, so when would we not be using it?
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.
Thanks! Looks good other than grammar
> using the `[debug-adapter]` subsystem). | ||
> 1. In your editor, set your breakpoints and any other debug settings (like break-on-exception). | ||
> 2. Run your code with `./pants run --debug-adapter`. | ||
> 3. Connect your editor to the server. The server host and port are logged by Pants when executing `run --debug-adaptor`. (They can also be configured using the `[debug-adapter]` subsystem). |
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.
How do you connect to the server?
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.
That's largely editor specific 🤷♂️
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.
With VSCode? I'm wondering if we should link to a certain guide, for example.
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.
For instance, in VS Code for Python you set up a "Python: Remote Attach" launch.json
configuration and with the default values, you start it (F5).
softwrap( | ||
f""" | ||
Using `run --debug-adapter` on the target {field_set.address}, which sets the field | ||
`run_in_sandbox` set to `True`. This will likely cause your breakpoints to not be hit, |
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 still say "set" twice.
Sorry, I normally wouldn't be this picky if it were a comment. But because it's documentation, I think it matters more.
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.
No need to apologize, I wanna get this right as well. Sorry my self-review-goggles are fuzzy today,
run's counterpart to pantsbuild#15799. Support is added for pex_binary (which will be spiritually lifted to the python_source with pantsbuild#15849) [ci skip-rust] [ci skip-build-wheels]
run's counterpart to pantsbuild#15799. Support is added for pex_binary (which will be spiritually lifted to the python_source with pantsbuild#15849) [ci skip-rust] [ci skip-build-wheels]
run
's counterpart to #15799. Support is added forpex_binary
(which will be spiritually lifted to thepython_source
with #15849)[ci skip-rust]
[ci skip-build-wheels]