rust-lang / rust-lang/rust-analyzer
Customize Run / Debug with Command Line Arguments
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Having the ability to quickly run and/or debug an individual test has been absolutely fantastic and in the case of tests and benchmarks, this is very straightforward. It would be nice though if the run/debug could be customized in some way within examples/ (and I'm guessing bin/ too?) where the main function could reasonably expect command line arguments.
I'm not sure what might be the best way to approach this. I can see a two main options:
- Adding 'Run with args' and 'Debug with args' to the list of possibilities. Four different run/debug options could become a big cluttered, but as this would not apply to most tests / benchmarks, I'm not sure this would be a big issue.
- Adding a 'Customize' option which would create a pre-filled entry in
launch.jsonallowing for the task to be run this way (and customized). Perhaps this could apply more generally?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing run and debug actions for individual tests and benchmarks, then inspect how examples/ and bin/ targets are discovered. Compare the proposed Run with args, Debug with args, and launch.json customization approaches; done means one chosen behavior is clearly specified and supports command-line arguments without unnecessary action clutter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100